Updated

Hundreds of uniformed officers filled St. Patrick's Cathedral and the streets of New York City Friday for the funeral of a legendary detective who famously forgave the teenage gunman who paralyzed him.

Detective Steven McDonald suffered a heart attack last week and died at a Long Island hospital on Tuesday. He was 59.

Steven McDonald obit

New York City Detective Steven McDonald, his wife Patti, and son, Conor, in 2015. (Stuart Ramson/Invision for Kelly Cares Foundation/AP Images, File)

THE WEEK IN PICTURES

McDonald was on patrol on July 12, 1986, when he spotted bicycle thief Shavod "Buddha" Jones and two other teenagers in Central Park. When he moved to frisk one of them, the 15-year-old Jones shot McDonald three times, with one bullet piercing the officer's spinal column.

In the hours after the shooting, hospital medics said the detective was not going to survive. He pulled through, but remained paralyzed for the rest of his life.

GUNFIRE TARGETING GEORGIA DEPUTY CAUGHT ON VIDEO

About six months later, with McDonald still struggling to recover, he made a statement about Jones through his wife that defined the rest of his life: "I forgive him and hope he can find peace and purpose in his life."

The officer was a role model at the New York Police Department, the nation's largest, Police Commissioner James O'Neill said in his eulogy.

"What we can learn from Steven's life is this: The cycle of violence that plagues so many lives today can be overcome only by breaking down the walls that separate people," O'Neill said. "The best tools for doing this, Steven taught us, are love, respect, and forgiveness."

The funeral procession passed Trump Tower. President-elect Donald Trump spoke with McDonald's family earlier this week to offer his condolences, transition team spokeswoman Hope Hicks told Fox News.

In a tweet, Trump called McDonald "a real NYC hero."

McDonald's "road on his earth was not easy, but he showed us what we need to know," Mayor Bill de Blasio told McDonald's widow, Patti Ann, police officer son and other mourners packed into St. Patrick's. "Now we have an obligation to tell his story across this city and all across his nation, especially at this time."

His son, Conor -- who is the same age his dad was when he was shot and now a fourth-generation officer -- was interrupted by three ovations as he described his father as a "real Superman." He could count on his father to call him at 5 a.m. every morning to check in before his son would go on patrol, he said.

"He was the greatest man I could ask to be my father," he said.

McDonald was also a die-hard hockey fan who gave powerful speeches at ceremonies for a New York Rangers award named in his honor, said former player Adam Graves.

"I want to make one thing clear: Steven McDonald meant more to the New York Rangers and our fans than we could ever mean to him," Graves said.

Pallbearers removed the officer's casket from St. Patrick's to the sound of church bells and the salutes of hundreds of uniformed officers. Eight police helicopters flying in formation also swooped in tribute over Fifth Avenue.

McDonald had remained on the New York Police Department's payroll as a detective until his death, but was best known as an international voice for peace and a source of support for other wounded police officers.

In the years following the shooting, McDonald met with Pope John Paul II and Nelson Mandela, and sat for an interview with Barbara Walters. He also took his message of forgiveness to Israel, Northern Ireland and Bosnia.

After Jones was sentenced to 10 years in prison for attempted murder, McDonald spoke of his hope that the pair would go on speaking tours together to offer a mutual message of peace. But shortly after Jones' release from prison in 1995, he died in a motorcycle accident.

FoxNews.com's Robert Gearty, Fox News' Shira Bush, Tamara Gitt and The Associated Press contributed to this report.