Updated

NEW YORK CITY – Fallen New York City police officer Jason Rivera, one of two killed earlier this month in the line of duty, was honored Thursday morning with a cross-borough procession that culminated with fellow cops lining the streets surrounding St. Patrick’s Cathedral, where loved ones and supporters would gather to say their final goodbyes. 

Manhattan’s Fifth Avenue was a sea of blue on Thursday as the hearse carrying 22-year-old Rivera’s remains pulled up to uniformed officers saluting the fallen NYPD hero. The vehicle was escorted by police as it traveled to the historic cathedral from a funeral home in the Bronx’s Riverdale, and passed traffic stopped in all directions along the way. 

SLAIN NYPD OFFICER TOLD STUDENTS AT HIS HIGH SCHOOL TO 'STAY STRONG' IN 2017 VIDEO

Bagpipes blared as the officer’s coffin was carried into the cathedral, where visitation began at 1 p.m. It ended seven hours later. A funeral was scheduled at St. Patrick’s Cathedral on Friday morning. 

An estimated 4,000 people, many of them police officers but civilians as well, turned out in the first two hours. They braved temperatures below freezing in a clear January day in New York City.

Some fellow officers wore uniforms showing they'd traveled from overseas. Many came from nearby states on the East Coast. Officers from the surrounding suburbs handed out food and coffee, with parts of 50th and 51st streets closed down. Mounted units and officers in tactical gear watched the perimeter.

There were veterans, firefighters, paramedics and many other mourners present.

A passerby leaned over the police barricade to tell officers waiting in line, "Thank you for your service. Thank you for your service officers. You don't hear it enough."

Across the street from the cathedral's main entrance, which police had cordoned off for the hearse and family, a lone protester held a sign that read, "Stop violence in New York and Honduras."

"In my country, they're killing people for nothing," she said. "Now in New York? It's too much."

After about an hour and 40 minutes in line, at the church entrance, civilians were directed to a quick security screening, where anti-terror officers scanned them before allowing them inside. Rivera's family took up the first 10 to 15 rows of pews, mourning in solidarity as thousands of peoples stopped down the steps from his coffin, saluting, praying or otherwise paying their respects to the open casket. 

Rivera and Wilbert Mora, 27, were shot Friday evening while responding to a report of a domestic violence incident in Harlem involving a mother and her adult son, Lashawn McNeil. 

SLAIN NYPD OFFICER WILBERT MORA’S ORGAN DONATIONS SAVE 5 LIVES: ‘SOMEBODY DID RECEIVE THIS HERO’S HEART’

Along with a third officer, the pair met with the woman and had begun to approach the back bedroom, where they were told McNeil was staying. As they approached, McNeil opened fire and struck Rivera and Mora. The third officer returned fire and critically injured McNeil. 

Rivera died Friday shortly after the shooting.

Rivera would have turned 23 next month. (Michael Ruiz/Fox News Digital)

Mora, who suffered a gunshot wound to the head, succumbed to his injuries on Tuesday. He donated his organs and was ultimately able to save five lives. Services have been scheduled for Feb. 1 and Feb. 2, and will also be held at St. Patrick’s Cathedral. 

CLICK HERE TO GET THE FOX NEWS APP

McNeil allegedly used a high-capacity magazine and a Glock handgun, both of which were found to have been stolen. He died from his injuries on Monday.