The funeral of Wenjian Liu, the second of two officers shot dead last month, has been held in New York.
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.
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 Bill de Blasio’s expressions of sympathy for anti-police protesters in recent months.
The double murder by 28-year-old African American gunman Ismaaiyl Brinsley, 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 Bill de Blasio told the funeral service: “All of our city is heartbroken today.”
Wenjian 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 Rafael Ramos’ funeral on December 27, 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 Wenjian 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 Bill 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.
Funeral arrangements had been delayed so relatives from China could travel to New York.
Wenjian Liu’s widow, Pei Xia Chen, said she had lost her “soul mate” and a “wonderful husband”.
His father broke down at the funeral as he described how his only child would telephone after every shift during his seven years in the force to reassure his parents he was safe.
“You are the best son, you are the best husband,” he said.
“We are very proud of you, we love you forever.”
A vigil was held on January 3 in Chinatown where community members gathered to burn pieces of paper in honor of Wenjian Liu, in keeping with Chinese tradition.
Ismaaiyl Brinsley killed himself in a subway station as police were closing in.
The gunman had a history of violence and mental instability. On the day of the shooting, Ismaaiyl Brinsley went on social media to say he was planning to kill police officers.
[youtube SCGJLOkXBwQ 650]