This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

MANHATTAN (PIX11) — During an emotional funeral mass for NYPD Officer Jason Rivera on Friday, Police Commissioner Keechant Sewell honored the slain officer with a posthumous promotion.

“Jason rose through every challenge that crossed his path. He was everything this city and the NYPD needed him to be,” Sewell said during her eulogy. “And it is with sincere admiration and appreciation that I promote him today to detective first-grade.”

First grade is the highest rank for a detective in the NYPD.

Sewell’s words were met with thunderous applause throughout St. Patrick’s Cathedral. The commissioner then stepped down and presented Rivera’s new shield to his wife, Dominique Rivera.

Thousands of NYPD officers came to Midtown Manhattan on Friday morning for a final salute to the fallen hero, who was gunned down with his partner a week ago in Harlem.

Roman Catholic Cardinal Timothy Dolan presided over the service, while eulogies were given from city leaders including Mayor Eric Adams. Rivera’s older brother and wife also spoke, through tears, at the emotional service.

Just a day earlier, thousands of uniformed officers, as well as ordinary citizens, filed into the cathedral for Rivera’s public wake on Thursday.

Rivera and a partner, Officer Wilbert Mora, were fatally wounded Jan. 21 by a gunman who ambushed them in a hallway as they responded to a family dispute. Mora’s funeral is being held next week, also at St. Patrick’s.

Gov. Kathy Hochul said flags at state buildings would fly at half-staff from sunrise the day of Rivera’s funeral Friday until sunset the day of Mora’s funeral, Feb. 2.

When the two officers responded last Friday to a domestic dispute involving 47-year-old Lashawn McNeil and his mother, authorities said McNeil swung open a bedroom door and opened fire with a 45-caliber pistol outfitted with a modified 40-round clip, hitting both officers in the head.

Rivera died that night, while Mora, 27, was pronounced dead at the hospital this past Tuesday.

Watch Officer Rivera’s funeral service in full:

The Associated Press contributed to this report.