An NYPD sergeant was struck by the teen driver of a stolen SUV in the Bronx moments before another cop jumped atop a police vehicle and shot the suspect, police said Monday.

The sergeant, who suffered leg injuries, was released from the hospital Monday and is expected to recover, Mayor Mamdani said in a statement. Two other cops suffered minor injuries when the suspect rammed into their vehicles.

“I spoke earlier today with the NYPD sergeant and was relieved to hear that he is recovering,” Mamdani said. “I thanked him for his service and wished him a full and speedy recovery. My thoughts are with the sergeant, his loved ones, his fellow officers, and everyone affected by this terrible incident.”

The 18-year-old suspected car thief in the Sunday evening confrontation, shot in the arm, was taken to St. Barnabas Hospital in stable condition.

The drama played out over two boroughs, police said, beginning when a Kia Sportage with New Jersey license plates was stolen in the Bronx Saturday.

An alert from a license plate reader flagged the Kia in Washington Heights at 5:35 p.m. Sunday. Ten minutes later an alert flagged the car as it headed into the Bronx over the University Heights Bridge.

NYPD Aviation Unit cops tracked the Kia from a helicopter, with officers from the Community Response Team following the suspect through the streets in unmarked cars.

The cops on the ground followed the car for about a mile, at which point the suspect stopped and let out a woman riding with him before taking off again. Then, two blocks away, the suspect stopped on East Fordham Road near Webster Ave., where he was quickly surrounded by officers in six unmarked vehicles.

The officers told the suspect and his remaining passenger multiple times to get out of the car, NYPD Assistant Chief Aneudy Castillo said, but the suspect instead “put the car into reverse, hitting one of the unmarked vehicles, and ultimately hitting multiple members of the NYPD.”

“He then put the Kia into drive and turned the wheels of the Kia to the right, where a sergeant was standing,” Castillo added. “He drove the car into the sergeant, who was thrown to the ground.”

Another officer jumped onto an NYPD vehicle to avoid being hit, Castillo said. The suspect again tried to escape, “reversing backwards with the sergeant on the ground in front of the Kia and multiple additional officers in close proximity to the car.”

The officer atop the unmarked vehicle then shot the suspect through the Kia windshield, police said, with other officers then arresting the teen.

Officers are told not to fire at moving vehicles except in exigent circumstances that could result in the death of a civilian or an officer.

The confrontation was captured on police body-worn cameras and the NYPD Force Investigation Division is reviewing the sequence of events, as it does with all such incidents, Castillo said.

The suspect and his passenger have not yet been charged. It’s not clear what role, if any, the woman played in the car theft.

The teen driving the Kia had been arrested in February for shooting a man near the scene of the clash with cops, Castillo said. He later made bail in that case.