NEW YORK (AP) — Weeks removed from an open revolt from his own police force that had officers turning their backs on him, Mayor Bill de Blasio now declares he has moved past the rift, striking a tenuous truce with a strategy to stay above the fray and public opinion that eventually soured on the cops' behavior.

While he acknowledged much work remains to repair the hard feelings over the chokehold death of Eric Garner, de Blasio told The Associated Press he has regained the footing to move on to other matters, including an agenda he plans to outline in next week's State of the City address.

"It was a perfect storm. It was based on two tragedies. The death of Eric Garner and the murder of these two officers. People felt pain all around," de Blasio said in an interview Friday. "I do believe things are much better. I believe the dialogue is moving forward."

It was the biggest crisis of the Democrat's year-old administration. Rank-and-file police had already been distrustful of him over his plans to reform such enforcement tactics as stop and frisk, and for his ties to the Rev. Al Sharpton, a fierce police critic.

Those seeds grew early in December when the streets filled with protesters angry over a Staten Island grand jury's decision not to indict a police officer for the chokehold death of Garner.

Then on Dec. 20, two police officers were ambushed by a gunman who said he wanted to "put wings on pigs." The head of the city's largest police union declared de Blasio had "blood on his hands."

On the very night of the slayings, police who gathered at the hospital where the slain officers were taken turned their backs on the mayor, a searing rebuke caught by television cameras.

De Blasio's planning on how to handle the crisis began the next day when shaken members of his inner circle devised a playbook.

Unveiled for the first time to the AP, that plan involved three parts:

—Stay on the moral high ground and maintain focus on the grieving families of the slain officers.

—Empower carefully chosen surrogates to speak on the administration's behalf, including Cardinal Timothy Dolan and Police Commissioner William Bratton, who allied himself closely with de Blasio but remained in good standing with the police unions.

—Avoid engaging in verbal warfare with the unions, hoping that the passage of time would dissipate the rank-and-file's anger.

For a while, the strategy failed.

Some police officers who had turned their backs on de Blasio at the hospital repeated that act at both funerals. The mayor was also heckled at a police graduation ceremony, and appeared tired and angry at his first news conference with reporters after the shooting.

Patrolmen's Benevolent Association head Patrick Lynch criticized the mayor for revealing that he told his son, who is biracial, to be wary of encounters with police. And union leaders blamed the mayor for supporting the Garner protesters, which they believed created an anti-police atmosphere that led to the killings. While most of the protests were peaceful, some demonstrators called police murderers and compared the NYPD to Nazis and the Ku Klux Klan.

At the peak of the crisis, Edward Mullins, head of the sergeants union, demanded that de Blasio apologize.

The mayor refused. A meeting between de Blasio and the union heads yielded nothing. And arrests citywide plummeted as the police officers went into a work slowdown.

But then the momentum shifted.

A Quinnipiac poll showed that de Blasio's approval rating held steady during the crisis, numbers that were mirrored in City Hall's own internal polling. And another poll showed that two-thirds of New Yorkers did not approve of the police unions' behavior. Cracks in their front began to show.

Lynch was confronted with an insurrection and could face a tough re-election fight. Mullins had a private meeting with the mayor mid-month and emerged saying de Blasio was "a gentleman."

"I think the public cared that City Hall stepped back from the debate and respected the families. Some others didn't,'" de Blasio said, calling the back-turning by some officers "an overstep — really inappropriate."

Neither Lynch nor Mullins would comment for this story.

Money may also have played a subtle role in brokering peace. Several of the police unions are working on expired contracts and while the PBA is in arbitration, the sergeants union is close to a deal. Also, the City Council announced $7.3 million to purchase new NYPD bulletproof vests, and de Blasio has dedicated additional funding to defend police officers from litigation.

Asked if he had any regrets during the crisis, de Blasio said it was in not moving quickly enough to repudiate the harsh rhetoric of protesters.

"I didn't understand how vile some of the language was," he said. "I wish I had understood better because there's no question in my mind it was unacceptable behavior even if Constitutionally protected."

But while anger has cooled, tensions remain and the crisis could flare again.

"De Blasio did a good job. He remained steadfast in what he believed," said Joseph Mercurio, a longtime political consultant. "But these police union leaders have long been at odds with mayors. I imagine it will happen again."