USA Today 3:16 p.m. EST January 4, 2015  .

Mayor: NYPD officer 'walked a path of courage'

David McKay Wilson and John Bacon

See USA Today gallery of photos from wake and funeral of Officer Liu.NEW YORK — Thousands of police officers and other mourners filled the streets of Brooklyn's Bensonhurst neighborhood under dreary skies Sunday to pay homage to a police officer shot to death while sitting in a patrol car last month.

Uniformed officers from across the nation joined family, friends and loved ones for the funeral of officer Wenjian Liu.

"All of our city is heartbroken today," Mayor Bill de Blasio eulogized. "Detective Wenjian Liu was a good man. He walked a path of courage, a path of sacrifice, and a path of kindness. This is who he was – and he was taken from us much too soon."

Many officers turned their backs to de Blasio's image on the giant outdoor video screen. De Blasio has faced withering criticism from some officers for statements he made in support of nationwide protests against police brutality and racial profiling.

Police Commissioner William Bratton also spoke, lauding Liu as a hero. "For seven years he kept the streets of Brooklyn safe," he said. "His dedication is hardly unique. It's what cops do ... We're cops, we hold the line. The thin blue line."

Liu's wife of two months called Liu her soulmate and best friend.

"His spirit will always look up to us," Pei Xia Chen said through tears. "We can always count on him. ... We love you. We love you forever."

Liu, 32, and his patrol partner, Rafael Ramos, 40, were ambushed Dec. 20. Both were posthumously promoted to detective. Ramos' funeral last weekend drew more than 10,000 officers. Liu's funeral was delayed so relatives from China could travel to New York.

On Sunday, throngs listened from outside to the service led by Buddhist monks. Liu's funeral also included a traditional police ceremony with eulogies led by a chaplain.

Sgt. Melissa Franks and officer Rodney Sneed of the DeSoto Police Department in South Dallas, Texas, were among hundreds of officers nationwide who took up JetBlue on its offer of free flights to the funeral.

"It's our duty to pay our respects," said Franks, who attended the funeral and Saturday's wake.

Las Vegas police officers Daniel Coyne and David Mann said they remembered that NYPD officers went to Nevada in 2014 when two officers were killed in the line of duty .

"We're here to repay the favor, " said Coyne, who was staying at the home of an NYPD colleague. "And they are taking good care of us."

Toronto Police Superintendent Peter Yuen was there with 15 Asian officers from the Canadian city.

"It's not often we have a fallen comrade from our background ," he said. "We are here for his final journey."

There were isolated protests. Retired NYPD officer John Mangan stood across from the Ralph Aievoli & Son Funeral Home with a placard that said "God Bless the NYPD Dump DeBlasio."

"It's a shame there is no support at the top for the poor cops," said Mangan, of Levittown, N.Y.

Liu's killer, Ismaaiyl Brinsley, 28, fatally shot himself moments after his rampage. Brinsley had posted on social media that he meant to avenge the deaths of two unarmed black men, Michael Brown of Ferguson, Mo., and Eric Garner of Staten Island, N.Y., who were killed in confrontations with police.

Grand jury decisions not to indict officers in those cases sparked nationwide protests. Some NYPD officers, accusing de Blasio of failing to show support for police following those rulings, also turned their backs on him the night Liu and Ramos were shot and again at the funeral for Ramos.

The officer protests drew a rebuke from Bratton last week.

"I issue no mandates, and I make no threats of discipline, but I remind you that when you don the uniform of this department, you are bound by the tradition, honor and decency that go with it," Bratton said Friday. "A hero's funeral is about grieving, not grievance."

David McKay Wilson also reports for The (Westchester County, N.Y.) Journal.