Ramdhanie — whose eight arrests include attempted murder in 2005 — survived the shooting and was in critical condition at Kings County Hospital last night.

The mayhem began at 10:21 a.m. when he was seen allegedly breaking the windows of a car with a handgun.

Cops took the car owner on a search of the area for Ramdhanie, who was fingered by the victim back at the scene of the vandalism.

When an officer walked over to Ramdhanie, the punk whipped a .38-caliber pistol and misfired. The old gun was reported stolen in 1988.

Ramdhaniethen ran toward a nearby supermarket and carjacked a vehicle occupied by two people, jumping in the back seat and telling them to take him away, police said.

That car was quickly intercepted by a plainclothes cop and a lieutenant from the 83rd Precinct in an unmarked cruiser, police said.

Ramdhanie “gets out of the car, has a gun in his hand, and the officers pursue him,” said Police Commissioner Ray Kelly.

“He turns with the weapon, and one round is fired by the police officer,” hitting Ramdhanie in the head, Kelly said.

The frightening spree continued an explosion of gun violence across the city since Thursday night. At least 14 people were shot, one fatally, in 10 separate incidents from 11:29 p.m. Thursday until early last night.