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 James Carver, president of the Nassau County Police Benevolent Association. His funeral is scheduled for Saturday. Vice President 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, also 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.

Liu's funeral arrangements have yet to be announced.

Ramos celebrated his 40th birthday this month. He joined the NYPD in 2012 after working as a school security officer.

The lifelong Brooklyn resident was married with two sons: a 13-year-old who is in middle school, and one who attends Bowdoin College in Maine.

The Silver Shield Foundation, a charity founded by the late New York Yankees owner George Steinbrenner, has set aside $40,000 for the education of Ramos' sons. Bowdoin College said it would cover the older son's education costs as long as he remained a student there.

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.