Hundreds of police officers have turned their backs on the mayor of New York at the funeral of the second of two officers shot dead last month.
Wenjian Liu, a son of Chinese migrants, was killed with his partner Rafael Ramos on 20 December by a gunman with a grievance against the police.
Speakers lined up to pay tribute at the service in a Brooklyn funeral home, the BBC reported.
In the street outside, hundreds turned their backs to a video screen when Mayor Bill de Blasio spoke.
Many rank-and-file members of the New York Police Department (NYPD) resent Mr de Blasio's expressions of sympathy for anti-police protesters in recent months.
The double murder by an African American gunman who claimed to be avenging black men killed by white police stunned the city.
New York police commissioner Bill Bratton had urged officers to refrain from any further "act of disrespect", saying in a memo, "A hero's funeral is about grieving, not grievance."
Mayor de Blasio told the funeral service: "All of our city is heartbroken today."
Liu, 32, had lost his life while fighting for "all that is decent and good", he said. He paid tribute to a "young man who came here from China at the age of 12 in search of the American dream".
Outside the funeral home, many uniformed officers could be seen turning their backs as the speech was relayed.
Shortly after the policemen were shot, the head of the city's largest police union, Patrick Lynch, had lashed out at the liberal mayor, saying there was "blood on many hands".
More than 20,000 officers attended Ramos' funeral on 27 December, and the sight of lines of police turning their backs marred the event for some.
"The mayor has no respect for us," retired NYPD detective Camille Sanfilippo told the Associated Press news agency at Liu's funeral. "Why should we have respect for him?''
Patrick Yoes, a national secretary with the 328,000-member Fraternal Order of Police, said before the new funeral: "Across this country, we seem to be under attack in the law enforcement profession, and the message to take away from this is: We are public servants. We are not public enemies."
The two policemen were shot following a wave of demonstrations over killings of unarmed black men by white police officers, beginning in the Missouri town of Ferguson last summer.
There was anger in New York after a grand jury decided not to press charges against a white police officer over the death of unarmed black man Eric Garner, who was placed in a chokehold while being restrained by police officers.
Mayor de Blasio had expressed solidarity with the protesters and had publicly wondered if his son, who is mixed-race, was safe from police.
Some argue that such rhetoric helped to create an environment that encouraged violence against police.