A grieving Wei Tang Liu sobbed and leaned on those at his side as he made his way to the lectern to say a few words about his son, Wenjian Liu, a photograph of him in his navy-blue police uniform and hat near sprays of flowers.

“This is the worst day in my life,” said the elder Liu, his voice breaking. “My only son left me.”

The funeral for Wenjian Liu on Sunday was the second time in as many weeks that police officers from New York and across the country have gathered to memorialize one of their own. And once again, many officers showed their displeasure with Mayor Bill de Blasio, turning their backs when his face appeared on giant screens set up outside the funeral home where the service was held.

This protest was not as large as the one staged last weekend at the funeral for Liu’s partner, Rafael Ramos, 40. The two were sitting in a squad car as part of a special detail aimed at reducing crime in the Bedford-Stuyvesant neighborhood of Brooklyn when they were fatally shot. The gunman, Ismaaiyl Brinsley, 28, who had a history of mental illness and numerous arrests, fled to a nearby subway station and committed suicide. Their deaths have come to symbolize frustration among police officers that they have been unfairly criticized during months of protests over police use of lethal force.

Officer Liu, 32, whom many called “Joe,” a seven-year veteran of the NYPD, had gotten married just a few months before his murder.

His father remembered him as a dutiful son who always made time to take his father to doctor appointments and would help him finish up at the garment factory where he worked. He even took his parents on his honeymoon.

“Wenjian, you are the best son,” his father said in Chinese, speaking through an interpreter. “You are the best husband. Also, you are our police officer and our best friend. Your action gave pride to all of us, and we are very proud of you.”

Wei Tang Liu also offered his condolences to the Ramos family.

Wenjian Liu’s widow, Pei Xia Chen, thanked the officers and officials for honoring the memory of her husband, whom she called her soul mate.

He had a passion for nature, she said. And for his family. And for being a police officer.

“He took pride in the fact that he is NYPD,” she said.

NYPD Commissioner Bill Bratton said of Liu: “He loved his family and they certainly loved him, as we see from so many who came from so far away. And at the end of every tour, he would call his father, to let him know he was safe. At the end of every tour — but one.”

Outside of the Ralph Aievoli and Son funeral home in Brooklyn, under a gray sky, officers in blue uniforms filled the street in a line that spanned several blocks. Residents watched from their windows and front steps, many from houses still decorated for the holidays. The officers stood stoically in formation, many in white gloves and with black bands covering their badge numbers in a show of grief.

“This isn’t the type of killing that we can accept,” said Officer Ryan Anderson, 39, of Berkeley, Calif. “To have an officer killed sitting in their car, that’s difficult to accept.”

Along the street, signs on light posts expressed love for Liu and support for the NYPD.

“They protect us,” said Sunny Mui, president of the Brooklyn Chinese-American Business Association, holding a banner with about 10 others that said the officer would be “in our heart forever.” “We honor Mr. Liu,” Mui said.

Inside the funeral home, de Blasio said, “All of our city is heartbroken today.”

“We’ve seen the pain that people feel from all walks of life, a sense of appreciation for the sacrifices of this family and of the Ramos family, their understanding — for people who have never worn a uniform — of how many dangers our men and women in uniform face, and what it means for their families,” he said. “All of this city is feeling the pain right now.”

De Blasio seemed to be trying to remedy some of the tensions between him and some police officers who have been angered by some of the mayor’s comments about the need for reforms in the department, particularly how it deals with communities of color. “Let us move forward by strengthening the bonds that unite us and let us work together to obtain peace,” he said.

As the mayor spoke, some officers turned their backs in protest to a screen outside the funeral home, coming face to face with those who remained in formation.

“Just no respect,” said a retired NYPD officer who was a member of the motorcycle brigade and declined to give his name. “There is always that few who like to stir things up.”

Nearby, a man held a sign that read: “God Bless the NYPD. Dump de Blasio.”

FBI Director James B. Comey acknowledged the danger that police officers face, noting that 115 officers were killed in the line of duty last year. He said it was a shocking increase from the year before.

“I do not know why there is so much evil and heartache in our world,” Comey said, “but I believe it is our obligation to make something good out of tragedy. To do good to honor this good man and to do everything to protect those who protect us.”

After the service, six pallbearers slowly carried Liu’s casket, draped in the green, white and blue flag of the NYPD, on their shoulders to a black hearse. Police helicopters flew overhead in the department’s ceremonial missing-man formation. A bugler played taps, and those in uniform saluted.

Gregory is a freelance writer.