New York City Mayor Bill de Blasio drew heckles and boos along with applause when he addressed graduating police cadets on Monday, two days after thousands of uniformed officers turned their backs on him at a slain policeman's funeral.
With the city a focal point in a national debate over the killings of unarmed black men by white police, the mayor has been struggling to mend the most toxic rift in decades between City Hall and the country's biggest police force.
Some booed as the mayor began his speech before 884 graduating cadets at Manhattan's Madison Square Garden arena. He warmly praised the police department.
"You will confront all the problems that plague our society," de Blasio told the new officers. "Problems that you didn't create."
A heckler cried out, "You created them!"
Some in the audience applauded and cheered the outburst. De Blasio, briefly flustered, continued his speech.
A dozen or so audience members turned their backs on the mayor, repeating a gesture by thousands of officers from around the country at Saturday's funeral for Police Officer Rafael Ramos. Police first turned their backs on the mayor a week earlier when he arrived at the hospital where Ramos and his partner, Wenjian Liu, were taken.
After the ceremony, some of the new officers said they appreciated de Blasio's support.
Before the mayor had even finished speaking, his press office sent journalists an email, apparently prepared in advance. It said this was not the first time a New York mayor was booed at a police graduation, and cited old news reports about de Blasio's three predecessors getting similar treatment.
Asked whether police had turned their backs on other mayors, Marti Adams, a spokeswoman for de Blasio, said she would have to double-check.
The rift between de Blasio and many in the police department preceded his taking office in January. De Blasio made police reform a theme of his campaign.
The rift deepened when de Blasio expressed qualified support for protests sparked by the deaths of unarmed black men at the hands of white police officers.
Some officers began openly shunning de Blasio after Ramos and Liu were ambushed and shot dead as they sat in their squad car in Brooklyn. The shooter wrote online that he was avenging the deaths of two unarmed black men who died in confrontations with white officers last summer in Ferguson, Missouri, and New York.
De Blasio and Police Commissioner Bill Bratton are due to meet the leaders of the city's five police unions on Tuesday, according to the mayor's public schedule.
In Los Angeles on Monday, police detained one man and were searching for a second after what they said was an unsuccessful sniper attack on two police officers in their patrol car on Sunday night. No one was injured, and it was not clear whether the incident was connected to the police protests.
Officer Liu's wake was scheduled for Saturday in Brooklyn and his funeral for Sunday.
The slaying of Ramos and Liu has become a rallying point for police forces beleaguered by months of demonstrations against police tactics in New York and other cities.
The demonstrations began in August after a white police officer fatally shot an unarmed black man, Michel Brown, 18, in Ferguson, Missouri. The shooting and a grand jury's decision not to indict the officer, Darren Wilson, triggered months of often-violent protests in the St. Louis suburb.
On July 17, Eric Garner, a 43-year-old black man, died after New York police put him in a banned chokehold while arresting him for illegally selling cigarettes. The grand jury in that case decided not to indict the officer who applied the chokehold, Daniel Pantaleo.