An off-duty police officer who saved a man from leaping off a Queens Center mall balcony by offering him a hug was honored Tuesday as a hero by Mayor Bill de Blasio and NYPD Commissioner Bill Bratton.

Officer Christian Campoverde told reporters at a Times Square event that his first thoughts upon seeing the distraught man were, “I need to calm him down. I need to connect to him. I don’t know exactly what he’s going through, but whatever he’s going through, it’s tough.”

Campoverde, 27, of Corona, Queens, had recently finished the police department’s Crisis Intervention Training and was shopping with his family on Dec. 20 when he heard a man mumbling that he wanted to kill himself and pushing past shoppers, according to an NYPD website.

He followed quickly, but got to the man when he had already placed one leg over the balcony railing. He grabbed the man by the waistband, talked to him about his troubles and offered a hug.

Campoverde admitted Tuesday that the encounter shook him up.

He said he had thought to himself, “I need to make him realize that it’s not worth it. There’s more out there.”

De Blasio commended Campoverde for his bravery and said the training on how to approach individuals with mental health challenges placed the officer at the “front line” of dealing with the emotionally disturbed.

“You did it right,” the mayor told Campoverde, “and you saved a life, and we are all very proud of you. ”