The NYPD precinct boss who retired in protest this week blasted politicians for wanting to “vilify” cops during a raucous final walk-out celebration at his Bronx stationhouse Friday.

Deputy Inspector Richard Brea rode off in a restored classic police car at about 3 p.m. after the celebration outside the 46th Precinct, which featured an NYPD helicopter fly by and NYPD bagpipers.

In a speech at the ceremony, Brea slammed politicians for not backing police officers amid nationwide protests against police brutality.

Deputy Inspector Richard Brea handed in his retirement papers after nearly three decades on the force. (NYPD)

“Their blood is in the concrete of every street corner, but these politicians don’t want to remember that. They want to blame and vilify everyone here. I won’t have that. No sir.”

“We have a duty and a responsibility to respect and guide other cops,” he added.

JUDGE JEANINE PIRRO: DEPARTURE OF NYPD COMMANDER A SIGN OF FRUSTRATION WITH 'FECKLESS' LEADERS

He also showered praise on his fellow officers at his precinct.

“My 46 family, the Alamo, I love you man,” he added, using a nickname for the precinct that covers neighborhoods in the Western Bronx.

After his remarks, he shook hands with his officers and posed for photos as the crowd cheered and clapped for him. He then climbed into the vintage police car rode around and rode shotgun as the driver made a ceremonious trip around the block.

NYPD CHIEF OF CRIME CONTROL CLAIMS ‘LAWLESSNESS’ IN NYC STREETS, BLAMES REFORMS FOR ‘EMPOWERING’ CRIMINALS

Brea handed in his retirement papers after nearly three decades on the force because department brass were not giving him proper instruction on how to rid the precinct’s Fordham neighborhood of guns and drugs, Guardian Angels founder Curtis Sliwa previously told The Post.

Brea had griped that with his anti-crime officers reassigned, he’d been put in the situation of explaining to department brass why arrests in his precinct were down at a CompStat meeting this week.

“I’ll be more than happy to come to CompStat and get a beatdown, but I’m not getting guidance,” Brea allegedly told Sliwa.

Police Commissioner Dermot Shea last week announced he was dissolving the unit because it was responsible for a “disproportionate” percentage of complaints and shootings.

Earlier Friday, Mayor Bill de Blasio suggested police officers had reason to be frustrated with the criminal justice system — but not because of reforms implemented by the department.

“The NYPD has a tremendous history of making adjustments,” de Blasio said. “Adjustments are being made as we speak. The choice on the anti-crime unit was the right one.”

CLICK HERE FOR THE FOX NEWS APP

“We’re in a moment where there are a lot of challenges.”