Hero NYPD cop Steven McDonald — who famously forgave the cowardly teenage gunman who left him paralyzed from the neck down 30 years ago — died Tuesday at North Shore University Hospital in Manhasset, Long Island. He was 59.

McDonald had been on life support since mucus clogged his respirator, sending him into cardiac arrest, on Friday.

Family members and fellow cops, including former NYPD Commissioner Ray Kelly, kept vigil by his side.

After being removed from life support, McDonald was declared dead at 1:09 p.m., sources said.

Hundreds of uniformed cops lined up outside the hospital and saluted as McDonald’s body was wheeled out of the hospital — followed by his family and friends — and driven away in a procession of police vehicles to await burial.

“Steven was an exceptional human being who should not be defined by the shooting that paralyzed him, but by what he accomplished in life after it happened,” said Michael Palladino, president of the NYPD detectives union.

Patrolmen’s Benevolent Association chief Pat Lynch called McDonald “the most courageous and forgiving man I have ever known.”

“Despite the tremendous pain in his life, both physical and emotional, his concern for his fellow police officers and for the people of New York City never wavered,” Lynch said.

“He was a powerful force for all that is good and is an inspiration to all of us….He was a true American hero.”

NYPD Commissioner James O’Neill said McDonald inspired people “in New York and around the world,” and called him “a model for each of us.”

“Like so many cops, Steven joined the NYPD to make a difference in people’s lives. And he accomplished that every day,” O’Neill said.

“He will be greatly missed, and will always remain a part of our family.”

A third-generation cop, McDonald returned to on active duty following his devastating injury, serving as a goodwill ambassador for the NYPD who attended events, gave speeches and counseled troubled kids.

He traveled to war-torn regions including the Middle East, Northern Ireland and Bosnia, and met with the late Pope John Paul II and Nelson Mandela.

McDonald was also the first person in wheelchair to march in the St. Patrick’s Day Parade, and in 1991 threatened a boycott unless organizers let other people with disabilities also join the procession.

McDonald was working an undercover patrol in Central Park, investigating a rash of bicycle robberies, when he chased down three suspects near the iconic boathouse on July 12, 1986.

One of the youths turned away from McDonald, pulled out a “Saturday night special” revolver and blasted the plainclothes cop with three .22-caliber rounds.

One bullet hit McDonald in the left side of his neck, shattering into fragments that lodged in his spinal column.

McDonald’s wife, Patti Ann McDonald — mayor of Malverne, Long Island, since 2007 — was pregnant at the time with their only child, a son they named Conor.

The shooter, 15-year-old Shavod Jones, was convicted by a jury that deliberated less than two hours and was sentenced to 3-1/3-to-10 years in the slammer, the maximum for a juvenile offender.

McDonald was left a quadriplegic, unable to breathe on his own, but publicly forgave the cold-blooded teen eight months after the shooting from his bed at Bellevue Hospital.

“I feel sorry for him,” McDonald said. “I forgive him and hope that he can find peace and purpose in his life.”

McDonald also expressed the hope he could help rehabilitated Jones so could eventually give inspirational talks together.

Jones, however, was far from a model prisoner and was denied parole three times. He wound up spending eight and half years behind bars, with much of it in solitary confinement.

Jones got sprung in 1995, but died just three days later, from head injuries suffered while riding on the back of a speeding motorcycle whose driver lost control and hit two parked cars while illegally popping wheelies in East Harlem.

One of the parked cars held a cop who was part of a special unit team keeping tabs on Jones, and who suffered minor injuries in the crash.

At the time, a pal of McDonald’s said he had been hoping to speak with Jones following his release, but “never got the opportunity.”

McDonald’s first assignment when he went back to work in January 1988 was giving a lecture to a new group of Emergency Service officers.

“I still have 17 years to go before retirement,” he joked at the time.

He was promoted to detective in 1995.

Son Conor followed him into the NYPD in 2010, and was given former Commissioner Kelly’s old badge, number 15978.

Conor was promoted to detective in January 2016 and again to sergeant in September.

Shortly after McDonald’s death, his dad, retired NYPD cop Dave McDonald, tearfully looked at the sea of cops gathered outside his hospital room and shook his head.

“I can’t believe how many lives he touched. So many people came up to me these last few days and told me stories about him and what he did for them,” he said.

“I just wish I could bottle all this up and take it home with me for when I go to sleep.”

Brother Tommy McDonald, also a retired NYPD cop, said: “He put up a long fight and now he’s going to heaven.”

McDonald was a longtime Rangers fan after whom the hockey team named the “Steven McDonald Extra Effort Award.”

“Steven exemplified the true meaning of the word hero and also personified the ‘Blueshirt Faithful,'” the team said in a statement.

“He is an inspiration to us all and his legacy will continue to live on in our hearts and minds.”

Cardinal Timothy Dolan​ said McDonald “was an icon of mercy and forgiveness, a prophet of the dignity of all human life, a shining example of the best of what the New York Police Department represents, a loving husband and father, and a fervent and faithful Catholic.”

NYPD Chief of Housing James Secreto, who was McDonald’s sergeant at the time he was shot, called him “a tremendous guy from Day One.”

“Last week, he came and spoke to a group of rookies that are going into Housing, 60 young officers, and as I introduced him, I introduced him as a great guy,” Secreto said.

“I didn’t know this was going to happen but I meant it: he’s a terrific guy, tremendous person. They don’t come like him. They just don’t come like him, any better person than him.”

NYPD sergeants union chief Ed Mullins called McDonald a role model who “turned a horrific situation into his life’s mission.”

Queens District Attorney Richard Brown said McDonald’s death “represents an insurmountable loss for the children of New York City,” adding: “I was proud to call him my friend.”

“He so generously lent his time to youth anti-violence initiatives like my office’s STAR Track (Straight Talk About Risks) program, which helps children in Far Rockaway ‘say no to violence’ by avoiding gangs, drugs and guns,” Brown said.

​Mayor de Blasio recalled speaking with McDonald late last year and said he would “forever cherish” the conversation.

“His words encouraged all of us to continue to bring police and communities closer together,” de Blasio said.

“There is no greater example of honor and service to others. Let it be our mission to continue his work.”

In addition to his wife, son, father and brother, McDonald had six brothers and sisters.

A wake for McDonald will be held Wednesday and Thursday at St. Agnes Church in Rockville Center, and his funeral Mass will be at 9:​30​ a.m. Friday at St. Patrick’s Cathedral in Manhattan, sources said.