NEW YORK – The broad Queens avenue began filling with blue coats early. The footsteps of the saddened officers, the buzz of police talk, fed the medley of sounds of an apprehensive city shaking itself awake.

The temperature was generous for the season. Christmas decorations bedecked doorways and windows, clashing with the morning's solemn event: the funeral of a police officer whose barbaric death has sliced deep into the city's conscience and tested its character.

On Saturday, one week removed from the slayings, the city wept for an officer, Rafael Ramos, New York Police Department Shield No. 6335, who was murdered Dec. 20 along with another officer for their choice of occupation.

The turnout was extraordinary. Although no reliable count was made, it appeared that more than 20,000 police officers came to Queens, from as far away as Wisconsin and California and England, some driving through the night to make it. Bordering streets were shut to traffic for blocks around. Traffic lights continued to change their colors, but there was no traffic, nothing but thick rows of police officers as far as anyone could see.

In these unsettled times, with police officers cautioned against operating alone, about wearing their uniforms when they did not need to, here they were everywhere, melded together and advertising who they were. For the funeral was as much about policing and those who attack it as about a single man. Besides the usual official presence of the governor, the mayor and the police commissioner, this ceremony brought the vice president of the United States.

Police career cut short

Few of the arrivals had met this particular officer. He came to police work late and had not done it long. He was 40 and knew the job for just three years. But his end came engulfed in symbolism. There were the haunting echoes from past murders of police officers. And there was the overlay of the persisting protests over race and policing that have followed Eric Garner's death by chokehold on Staten Island in July and that of Michael Brown, shot by a police officer in Ferguson, Mo., in August. In neither case were the officers involved indicted.

The brief seconds of the killings are well known. Ramos sat with his partner, Wenjian Liu, in a squad car, on a Brooklyn street corner on an unremarkable afternoon. Without warning or provocation, the officers were gunned down execution style by an assassin expressing an intent to end the lives of police officers. The killer, Ismaaiyl Brinsley, then shot himself on a nearby subway platform.

The service for Ramos was held at Christ Tabernacle Church, a brick, flat-roofed structure, re-imagined from a movie theater and a dress store, nestled in a lively commercial strip.

The church can seat 850, hopelessly inadequate for the swell of attendees. The enormous overflow crowd gathered outside in the mild Queens air. Those who could edge near enough stood and saw the proceedings unspool on several huge screens.

Ramos' widow, Maritza, and his two teenage sons, Justin and Jayden, sat up front. They knew this church on better occasions.

Vice President Joe Biden, dispatched by President Obama, spoke movingly of the courage of policing.

"When an assassin's bullet targeted two officers, it targeted this city and it touched the soul of an entire nation," he said.

He referenced a headstone in Ireland that reads: "Death leaves a heartache no one can heal. Love leaves a memory that no one can steal."

Speaking next, Gov. Andrew Cuomo said, "We want every NYPD officer to know that they are not alone. Every New Yorker stands with you today."

Controversy amid tragedy

Cuomo was followed by Mayor Bill de Blasio, who has been struggling with the fallout since the shootings, as many officers on the city's force have found him disrespectful and unsupportive.

In his remarks, de Blasio also praised the Police Department and Ramos.

"Our hearts are aching today," he said. "New York City has lost a hero."

De Blasio spoke of how Ramos played basketball in the park with his sons and blasted Spanish gospel music from his car, and how he "embodied a powerful idea. If your way isn't working, try God's way."

As he began to speak, a sizable pocket of officers gathered outside in front of one of the giant screens turned their backs to his image. The New York City officers swiveled around first, and then were imitated by officers from other departments.

Asked whether they faced away because the mayor was speaking, one of them slowly nodded his head.

Afterward, a spokesman for the mayor said, "Our sole focus is unifying this city and honoring the lives of our two police officers."

Police Commissioner William J. Bratton noted how he has been coming to police funerals for 54 years and every time he attends another one, "I always pray it will be the last. But I know it won't."

Liu's funeral still awaits the arrival of relatives from China.

Bratton said that the police are "the blue thread that holds the city together when disorder might pull it apart."

He urged everyone to "learn to see each other" as a means to halt the anger against the police.

The eulogies and prayers completed, the stream of officers stood stock-still and erect and watched the coffin, concealed beneath the green-blue-and-white police flag, carried out on the shoulders of six officers and guided into the back of a hearse. A pair of buglers played taps from an elevated platform. Police helicopters roared overhead in missing-man formation, alerting the skies that one of the department's 35,000 was no longer among them.

Hundreds of motorcycles, lights blinking, hailing from police departments across the country, thundered down the street, followed by bagpipers and drummers beating drums draped in black.

Under wrinkled clouds, the hearse came next. As it passed, the men saluted with their gloved hand. The hearse gathered speed and dwindled into the distance, carrying a man who died because he wore the badge.