NYPD Det. Steven McDonald, whose message of forgiveness and hope touched generations, was remembered Friday at St. Patrick’s Cathedral as an inspirational hero who firmly believed that love conquered hate.

Thousands of NYPD officers, civic leaders and members of the public gathered to pay their respects to McDonald, 59, of Malverne, who died Tuesday after suffering a heart attack late last week.

McDonald was shot and wounded while on duty in Central Park in July 1986, and had been paralyzed from the neck down, using a ventilator to breathe. Drawing strength from his faith, he publicly forgave the teenager who shot him.

At his funeral, friends and family recalled a “man on a mission” who never let his physical limitations dictate how he would live his life.

McDonald was remembered as a devout Catholic, devoted husband, dutiful cop and proud father.

“My dad loved life, and he lived it to the fullest,” said his son, Conor McDonald, an NYPD sergeant. “And my dad wanted to make sure his time on Earth was not wasted — that is why he was so passionate about spreading God’s message of love, compassion and forgiveness.”

advertisement | advertise on newsday

More than 100 police motorcycles escorted McDonald’s coffin down Fifth Avenue to the cathedral Friday morning. A slow peal of bells rang out, keeping pace with the police band’s mournful drumbeat.

The turnout was one of the biggest for a fallen police officer in recent memory. Onlookers and cops filled four blocks, north and south of the cathedral.

Shortly before 10 a.m., the flag-draped coffin carrying McDonald arrived, Cardinal Timothy Dolan sprinkling it with holy water as it entered St. Patrick’s.

McDonald’s wife, Patricia Ann, the Malverne mayor, held hands with Conor, following the coffin as it was carried up the aisle to the altar.

In a homily delivered by Patricia Ann McDonald’s cousin, Msgr. Séamus O’Boyle, McDonald was remembered as a man who refused to feel sorry for himself or harbor hate.

“Steven was a man on a mission. If you ever heard him giving a talk — he had a great admiration for Martin Luther King [Jr.]. Martin Luther King famously said, ‘Hate cannot drive out hate, only love can,’ ” O’Boyle said. “Steven wholeheartedly concurred with that — there was no point feeling hate in your heart. It is a destructive and wasting disease; only love can conquer hate.”

Those in attendance included former New York Mayor Rudy Giuliani, Manhattan District Attorney Cyrus Vance Jr., former NYPD Commissioners Ray Kelly and Bill Bratton, FDNY Commissioner Daniel Nigro and Manhattan U.S. Attorney Preet Bharara. Also in the pews was former late-night talk show host David Letterman, who had become close with McDonald’s family.

President-elect Donald J. Trump later took to Twitter to pay his respects. “A beautiful funeral today for a real NYC hero,” he tweeted.

advertisement | advertise on newsday

McDonald was wounded when Shavod Jones, a troubled 15-year-old from Manhattan, shot the young cop while he was on patrol in Central Park. McDonald was struck numerous times. Jones served time in prison for the shooting and later died in a 1995 motorcycle crash.

Over time, McDonald regained his ability to speak through controlled breathing and used a wheelchair for mobility. About eight months after he was shot, he publicly forgave Jones and began speaking about the power of forgiveness. He remained an active-duty member of the NYPD and spoke at police functions and in precincts.

In his eulogy, Mayor Bill de Blasio hailed McDonald as “a hero who overcame all the pain, all the discomfort, all the challenges every day, every hour, because he had a sense of a mission. ... We feel pain and we feel joy that we knew him. We learn … the right way to live from him.

“Directly, he touched thousands of lives — tens of thousands of lives — but in a greater way millions were moved by his example.”

NYPD Commissioner James O’Neill called McDonald “one of the most remarkable men I ever met and one of the most fearless cops to ever don a uniform. ... He became … a larger-than-life symbol of forgiveness.”

advertisement | advertise on newsday

McDonald, an ardent New York Rangers fan, was also eulogized by Adam Graves, a former star player.

“We are grateful and humbled for the role our team played in this remarkable man’s life,” Graves said, noting that the Rangers created the Steven McDonald Extra Effort Award — given each year to a player who goes above and beyond.

“It is considered one of the Rangers’ greatest honors and is deeply meaningful to our players and fans,” he said.

The final eulogy was given by Conor McDonald, who leaned down to kiss his father’s coffin before speaking from the pulpit.

“My dad loved the NYPD until the end,” he said. “He loved the shield, he loved the uniform, he loved his bosses, he loved the men and women who wake up every day to protect this city.”

Every day, he said, his father forgave the man who shot him.

“He made it his mission for all of us to realize that love must win,” Conor McDonald told the mourners.

He ended his remarks to thunderous applause. After greeting officials in the front row, he gathered his sobbing mother in a big embrace.

After the Mass, McDonald’s coffin was carried out — saluted by a sea of white-gloved officers in blue. Eight police helicopters flew by as buglers played “Taps.”

Sgt. Conor McDonald leaves the Parish Center at St. Agnes Cathedral before the departure of the coffin carrying his father, NYPD Det. Steven McDonald, on Friday, Jan. 13, 2017, in Rockville Centre. Photo Credit: Howard Schnapp

The flag that had draped the coffin was folded and presented to the widow. McDonald was later laid to rest at Holy Rood Cemetery in Westbury.

After the funeral, Bratton, who had known McDonald for 25 years, marveled yet again at the revered cop’s courage and conviction.

“If any person ever lived a life promoting the idea of compassion and love, it was Steven,” he said. “Life took so much from him, but despite that he gave so much back.”