Top cop James O’Neill broke down Friday as he remembered “extraordinary” Finest Brian Mulkeen at the hero’s hometown funeral — where mourners included the officers who accidentally killed him.

Mulkeen, 33, was slain by friendly fire while taking down a suspect at a Bronx housing project early Sunday, and the cops who shot him when they heard gunfire have made peace with his family and girlfriend, a law enforcement source told The Post.

“They don’t blame the cops. They know it was [suspect Antonio] Williams,” the source said of Mulkeen’s loved ones. “They understand it was [Williams’] fault, that no one else did it. If it wasn’t for him, we’d all be hanging out with Brian this weekend.’’

The source added that there are no plans to tell the officers which one fired the fatal shot that felled their comrade.

The officers joined a miles-long sea of fellow cops for the funeral service at Sacred Heart Church in upstate Monroe, where Mulkeen was raised.

Also at the service were his parents, Camille and Brian, sister Erin, brother Eric, his 89-year-old former NYPD grandfather and Mulkeen’s cop girlfriend.

“He did his job, and he didn’t think twice about it — he didn’t hesitate — because he was a cop. And cops are special people,” O’Neill said of Mulkeen, at times fighting back tears.

“What he accomplished in his short time on the job, and at just 33 years old — regularly taking loaded guns off the street and locking up society’s main drivers of violence and disorder — was nothing short of extraordinary,”

During O’Neill’s emotional eulogy, in which he posthumously promoted Mulkeen to Detective First Grade, the city’s top cop pushed backed against the fact that Mulkeen was slain by friendly fire.

“As every cop knows, one person is responsible for Brian’s death,” O’Neill said.

“And that’s the person carrying a loaded, illegal gun who decided to run from the police,” he said, referring to the suspect, who also was killed in the chaotic early Sunday incident.

“Every cop knows that. And every New Yorker should know that.”

Mulkeen’s casket, draped in a white and green NYPD flag, was carried into the church by police pallbearers as the NYPD’s Emerald Society Pipes and Drums played “Amazing Grace” amid a sea of thousands, including many of his brothers and sisters in blue and dozens of Police Academy recruits, who lined the streets surrounding the Catholic house of worship.

Mayor Bill de Blasio and O’Neill were among those standing outside the church during the somber procession, which included officers not only from the NYPD, but also from Nassau County, Suffolk County, Yonkers, Connecticut’s Danbury, Bridgeport and Hartford, and New Jersey’s Fort Lee, Newark and Camden.

The hymns “Nearer, My God to Thee” and “Amazing Grace” were sung as mourners filed into the church for the Mass, which Cardinal Timothy Dolan presided over.

Mulkeen, who gave up a lucrative job at Merrill Lynch to join the NYPD, was killed by two police bullets early Sunday during a violent life-or-death struggle with a reputed gangbanger in the Bronx.

“He could have taken an easier path,” de Blasio said during the service. “That wasn’t Brian. He wanted to be on the front line. He wanted to protect people.”

“He chose to leave that very comfortable life, and he joined the NYPD, and we will always be very grateful for that decision.”

De Blasio’s said that after Mulkeen’s death, “One of the most common statements” he heard from those who knew Mulkeen was, “If you met Brian, you fell in love instantly.

“He was that kind of person. The good in him was so clear, so strong,” the mayor said. “It was clear to Brian that his mission was to protect and serve others — to do something brave, to do something courageous.”

Mulkeen, a six-and-half year officer, and several plainclothes anti-crime cops were patrolling around the Edenwald Houses shortly after midnight due to recent gang activity in the area when they encountered 27-year-old Antonio Lavance Williams.

When the cops tried to confront Williams, he took off running with a loaded .32-caliber revolver in hand.

Mulkeen, a former track-and-field star for Fordham University, bolted after Williams, tackling and disarming the ex-con, who then tried to rip Mulkeen’s Glock from his holster.

The two ferociously wrestled for control of Mulkeen’s gun, which Mulkeen never let go of.

Mulkeen managed to squeeze off five rounds at Williams, prompting five fellow cops on the perimeter to open fire, unleashing a total of 10 rounds — one of which fatally struck Mulkeen in the head and another in the torso.

Williams was also killed during the seconds-long confrontation.

“In the very early hours of last Sunday, the NYPD sent Officer Brian Mulkeen out to do a job,” said O’Neill. “It’s a job that he had already done exceptionally well for seven years, battling against the flood of illegal firearms and violent gang activity that plagues too many of our neighborhoods.”

“It’s a stressful, hazardous, and unfortunately, many times, thankless job. One that not many people are able or willing to do. But, thankfully for the people of The Bronx, Brian was willing. And he was great at it.”

O’Neill, who called Mulkeen “absolutely remarkable,” commended the slain officer and his partners, saying: “It takes a tremendous amount of courage and skill to do the work Brian and his team are so adept at doing — the type of courage that you really don’t expect people to possess, much less display every single day and night.”

Of Mulkeen, O’Neill said, “We see a man who made a conscious decision to leave a good job in order to put the lives of others above his own.”

Mulkeen — who lived in Yorktown Heights with his girlfriend, a cop in the Bronx’s 44th Precinct — is the second NYPD officer killed in the line of duty this year. Both were killed by friendly fire.

“Long after we’re gone, this department will remember Brian,” Msgr. Robert Romano, the NYPD’s assistant chief chaplain, told mourners. “He will be remembered for what happened that fateful morning. That night Brian became in the newspapers a hero, but he always was a hero.

“He was a hero when he was growing up. He was a hero when he got onto the Police Department – and now the world knows he is a hero. And those are thing that we need to hold in our heart,” Romano said.

One NYPD cop who attended the funeral remembered Mulkeen as someone who “always had a smile on his face.”

“He was a bright light, always making people laugh,” said the cop, Officer Vladimir Julien, 29, of the 44th Precinct. “Always helping people out, always willing to help.”

Additional reporting by Lorena Mongelli