NEW YORK - The wife and two sons of a police officer gunned down along with his partner in a brazen daylight ambush were joined at his wake Friday by hundreds of uniformed officers, including dozens who saluted as his flag-draped casket was carried into the church.

The daylong tribute to Officer Rafael Ramos occurred at a Queens church where friends and colleagues spoke of him as an embodiment of the selfless, compassionate, and heroic nature the New York Police Department wants its finest officers to project.

"He was studying to be a pastor," NYPD Capt. Sergio Centa said before entering Christ Tabernacle Church. "He had Bible study books in his locker, which is rare for a police officer, but that goes to show you the type of man he was."

Ramos was dressed in full dress uniform in an open casket, said Nassau County Police Benevolent Association President James Carver. His funeral is scheduled for Saturday. Vice President Joe Biden is expected to attend, along with Mayor Bill de Blasio.

Police union officials have criticized de Blasio, saying he contributed to a climate of mistrust toward police amid protests over the deaths of black men at the hands of white officers. Union officials have said the mayor's response, including his mention of how he often feared for the safety of his biracial son in his interactions with police, helped set the stage for the killings.

But de Blasio, who has praised officers for their service both before and amid the protests, has stood solidly behind the department since the Dec. 20 slayings of Ramos and Officer Wenjian Liu as they sat in their patrol car on a Brooklyn street. The shooter, Ismaaiyl Brinsley, later killed himself.

After the killings, de Blasio called for a temporary halt to demonstrations against police after grand juries in Missouri and on Staten Island declined to charge white police officers in the deaths of two black men.

He denounced as "divisive" a demonstration that took place anyway and tweeted a thank you to police Thursday for arresting a man accused of threatening to kill officers. Still, on Friday, an airplane hauling a banner insulting the mayor organized by a former police officer-turned-activist flew above New York City.

At the church, Pastor Ralph Castillo said Ramos was a beloved member.

"Whether he was helping a mom with a carriage or bringing someone to their seats," Castillo said, "he did it with so much love and so much vigor and so much joy."

In the evening, hundreds of additional mourners were expected to spill into the streets outside the church to hear speakers eulogize Ramos and to watch on giant video screens. Police Commissioner William Bratton, Cardinal Timothy Dolan, and other politicians had arrived for the ceremony.

Ramos was a long-standing and deeply committed member of the church, where he served as an usher, family and friends said.

"We feel sorry for the family, and nobody deserves to die like this," said fellow churchgoer Hilda Kiefer as she waited to enter the wake.

The killings ramped up emotions in the already-tense national debate over police conduct. Since Ramos and Liu were killed, police in New York say they have arrested seven people accused of threatening officers.

Liu's funeral arrangements have yet to be announced.

Ramos, who celebrated his 40th birthday this month, was married with two sons: a 13-year-old who is in middle school, and one who attends Bowdoin College in Maine.

The Stephen Siller Tunnel to Towers Foundation, a charity created after 9/11, says it will pay off the home mortgages of the two slain officers.