An off-duty NYPD detective was brutally stabbed and slashed seven times during a brazen robbery in the Bronx Friday afternoon, law enforcement sources said.

Jose Mercedes was ambushed when the e-bike-riding duo approached him and tried to snatch the cop’s gold chain while he was clearing out the trunk of his car around 1:40 p.m. at East 206th Street and Rochambeau Avenue in Norwood, the sources and the NYPD said.

Jose Mercedes, a detective assigned to the 44th Precinct, joined the NYPD in July 2016. Instagram/Ali Buckets

An off-duty police officer from the 52nd Precinct was slashed during a botched robbery attempt at 3176 Rochambeau Ave. in the Norwood section. Obtained by NY Post

The suspects were seen taking off on their e-bikes in surveillance footage. Obtained by NY Post

The bloody melee unfolded when the detective fought back against the brutes, sources added. 

Terrifying video obtained by The Post showed Mercedes covered in blood and being loaded into an ambulance on a stretcher.

He was knifed at least seven times in his neck and leg and rushed to Jacobi Medical Center, where he is listed in stable condition, according to sources and cops.

Two male suspects quickly took off on their e-bikes, the sources said.

The two suspects took off on their e-bikes. James Keivom for NY Post

NYPD officials seen investigating the crime scene Friday. James Keivom for NY Post

At least one suspect was involved in a previous moped robbery. It was not immediately clear what, if anything, was stolen from the detective, according to the sources.

Mayor Zohran Mamdani and NYPD Commissioner Jessica Tisch visited the wounded detective at the hospital on Friday afternoon.

Mercedes, who is assigned to the 44th Precinct, joined the NYPD in July 2016, the sources said.