No decision seems to have defined the tenure of NYPD Commissioner James O’Neill more than firing of Daniel Pantaleo, the plain clothes officer captured on video putting his arm around the neck of Eric Garner as he repeatedly pleads, “I can’t breathe.” Garner’s death at the hands of police would become a flashpoint in the national uproar over police-community relations.

For police-reform advocates, the move was portrayed as the last opportunity for justice. The city’s 43rd police commissioner made a decision few NYPD leaders before him have been willing to make, firing a police officer who was absolved of a crime, but found guilty of violating department policy.

To the 36,000 officers he oversees, O’Neill’s decision was as an act of betrayal, that even the commissioner admitted he can understand: “If I were still a cop,” O’Neill said on the day he announced Pantaleo’s termination, “I would be mad at me.”

For O’Neill, who after 36 years in uniform was seen as a cop’s cop when he took the job, it was simply the right decision as the NYPD and police around the country try to mend relationships with communities they serve.

“When something bad happens, you have to own it. It’s important that you do,” O’Neill said in an interview with The Daily Beast during his final days in office. “If we’re going to build trust, we’re going to have to speak the truth. It comes at a cost, but that’s OK. You take this job knowing there are difficult decisions that are going to have to be made and you have to stand up for what’s right.”

At some point on Friday, O’Neill will leave NYPD headquarters after more than three years as police commissioner. After 36 years in policing, he’ll join the private sector at credit-card giant Visa as a senior vice president and global head of security.

O’Neill has said he is “not particularly concerned about my legacy,” but adversaries and allies who’ve worked closely with him believe time will prove that he leaves behind a favorable one.

If Pantaleo is how O’Neill be remembered, his legacy could one day be as the architect of neighborhood policing program where officers duties include setting aside time to develop relationships with people in their communities.

Councilman Donovan Richards, who as chair of the public safety committee, has clashed with the commissioner during his years at the department said O’Neill’s decision on Pantaleo is “something I will always remember because that was not an easy decision to make. He had the weight of the world on his shoulders.

“Commissioner O’Neill is a man of integrity, a man who even through differences, has always been willing to have an open ear on those differences,” Richards continued. “One thing I appreciate about him, is his willingness to hear the other side.”

But he quickly pivots to neighborhood policing program (also known as NCO), crediting O’Neill with redefining “what community and police should look like. He’s leaving a legacy behind. He set this department on the trajectory that people will celebrate in the future. The chicken is being baked or the turkey is being baked. We still have a ways to go, but I get to see how far we have come. The NCO programs is reaching the depths of communities who feel their voices have not been heard.”

For Richard Aborn, who heads the Citizens Crime Commission, a nonprofit organization focusing on crime and public safety policies in the city, O’Neill understood that while the NYPD succeeded in bringing crime to historic lows, “it had been less successful in the equally critical mission of achieving a trusting relationship with communities in New York—and he set out to repair that breach.”

“His legacy will be neighborhood policing, a carefully calibrated realignment of policing designed to build trust and develop robust, real relationships between police officers and neighborhood residents resulting in a mutually aligned effort to maintain safe neighborhoods,” Aborn said. “Once fully embedded, Neighborhood Policing will alter for the better the face of policing in NYC and Commissioner O’Neill will rightfully get the credit.”

Now part of all police precincts in the city including every subway station, officers in the NCO program aren’t evaluated on the number of arrests they make, but on how they deal with controlling crime conditions.

“We are asking police officers, you’re job is not just to answer 911 jobs and to do proactive policing... a big part of that is to create relationships, to maintain relationships to identify problems and be able to solve problems,” O’Neill says on handicapping where community policing stands today.

“Is it perfect? I don’t think policing anywhere is going to be perfect. There’s too many variables. There’s 8.5 million people, there’s 60 million visitors, there’s 36,000 cops, 18,000 civilians. Who knows how many people come to work a day in New York City. We strive for perfection, but I don’t think that’s the nature of humanity. I don’t think we’re ever going to reach it.”

To judge the NCO program’s success and long term impact, O’Neill says the department has contracted with the Rand Corporation, a non-profit think tank, on a two-year study of neighborhood policing to “make sure it’s what we think it is.”

“Anecdotally, we are getting really positive feedback from the cops, really positive feedback from the community,” he said. “I think we are in a good place, but it needs to be reinforced with some research too.”

That O’Neill, 62, became NYPD police commissioner was a dramatic change in fortunes that began when former Police Commissioner Bill Bratton took over as leader of the nation’s largest police force under Mayor Bill de Blasio in 2014.

In the months leading up to Bratton’s appointment, O’Neill was weighing retirement after falling out of favor with then Commissioner Ray Kelly in 2008 when he was head of the narcotics division. O’Neill was one of three people transferred from the unit after officers were caught in a scandal for paying informants with drugs instead of cash.

O’Neill would end up as head of the fugitive enforcement division, an abrupt shift to a career in which he had a fast rise up the ranks. During a banishment that lasted six years, O’Neill called Bratton in 2013 asking about jobs in the private sector.

Bratton encouraged O’Neill to stick around, telling him that he had been talking with several mayoral candidates about returning to the NYPD. In January 2014, Bratton was sworn in as police commissioner under de Blasio and he hired O’Neill to join his executive staff. That summer O’Neill was installed as the NYPD’s chief of patrol. And that November, O’Neill was promoted to chief of the pepartment, the NYPD’s top uniformed commander.

And when Bratton announced his retirement in August 2016, O’Neill was tapped by de Blasio to be the next police commissioner.

Asked if he could remember the day he agreed to take this job if he could remember he wanted it, O’Neill pauses and jokes, “Are you still recording?”

Then he continues, simply stating, “I knew it was going to be an opportunity to make the NYPD a better place and to make the city a better place.”

It’s a sleepless job with the task of keeping one of the world’s biggest terrorist targets safe. O’Neill learned this less that 24 hours into the job when a pressure cooker bomb exploded in Manhattan, the worst terrorist attack on the city since September 11. He would experience two more terrorist attacks during his tenure.

He would also become the commissioner who earlier this year finally took the step of apologizing for the NYPD raid on Stonewall Inn on the 50th anniversary of the riots there.

“What happened should not have happened,” O’Neill said during an event at NYPD headquarters. “The actions taken by the NYPD were wrong, plain and simple. The actions and the laws were discriminatory and oppressive, and for that, I apologize. I vow to the LGBTQ community that this would never happen in the NYPD in 2019. We have, and we do, embrace all New Yorkers.”

Chuck Wexler, executive director of the Police Executive Research Forum says this kind of leadership and compassion helped O’Neill “emerge as one of the toughest most forward thinking police commissioners in New York history.”

“Jimmy O’Neil’s legacy will be that of a humble transit cop who went on to become police commissioner and faced with making with making gut wrenching personnel decisions while bringing crime down to historic levels,” Wexler said. “For his decisions in the Garner, [Deborah] Danner and Stonewall cases proved he had the courage and self assurance to rule in the best interests of both the community and the department.”

In keeping with his keep-your-head-down, cop’s cop persona, O’Neill doesn’t need any ceremonial send off to mark his achievements. He’s happy to leave quietly, passing the baton to NYPD Chief of Detectives Dermot Shea, who on December 1 will be officially sworn in as the new police commissioner. “I walked in alone,” says O’Neill, adding, “I’m going to walk out alone.”