(Updates with de Blasio attending)
By Jonathan Allen and Sebastien Malo
NEW YORK, Dec 26 (Reuters) - Police officers in dress uniform and other mourners joined a somber, four-block line outside a New York City church on Friday for the wake of one of two officers shot by a man who said he was avenging the killing of unarmed black men by police.
Rafael Ramos and Wenjian Liu were slain last Saturday afternoon while sitting in their patrol car in Brooklyn.
Singled out because of their uniforms, their deaths have become a rallying point for police and their supporters around the country, beleaguered by months of street rallies by protesters who say police practices are marked by racism.
Stephen Davis, the police department's chief spokesman, said Saturday's service may prove to be the largest funeral in the police department's history, with tens of thousands of people, including U.S. Vice President Joe Biden, expected to fill the church and the streets outside.
Draped in the New York Police Department's green, white and blue flag, Ramos's coffin was carried into a church in his Queens neighborhood by police officers as colleagues from his Brooklyn station house stood saluting.
Ramos, 40, had been on the force for two years and was raising two teenage sons with his wife, Maritza.
"Dad, I'm forever grateful for the sacrifices you made to provide for me and Jaden," his son Justin said in an emotional voice during a memorial service held after the wake, projected on a large screen in the streets outside. "He was my absolute best friend."
Ramos's funeral came at the end of a week during which heated rhetoric and blame marked a city that had largely escaped some of the more violent outbursts seen in six months of nationwide protests against police use of force.
In extraordinary scenes at the hospital where Liu and Ramos were taken on Saturday, police union leaders, angered by Mayor Bill de Blasio's qualified support of the protesters, said the mayor had "blood on his hands". As the mayor arrived at the hospital, some officers turned their backs to him in a pointed display of disrespect.
Two days later, a visibly angered mayor chastised some journalists at a news conference for what he called "divisive" coverage, while urging activists to halt demonstrations until after the police funerals. Activists denounced the request as suggesting they were partly to blame for the deaths. Small groups of protesters continued to take to the streets chanting "How do you spell murderer? NYPD" and other anti-police chants.
The mayor, who attended Ramos' wake briefly toward the end of the service, has said he hopes the funerals will help mend the city's fractured mood.