That’s one way to deal with a gridlock.

An NYPD traffic cop turned a Queens street into a demolition derby in a video circulating on YouTube, clearing a jam by apparently intentionally slamming into two cars.

The clip, shot around 3:20 p.m. Saturday, opens with the department vehicle sandwiched between two cars on 37th Avenue near Main Street in Flushing.

After several seconds of the lead vehicle not moving into the clear asphalt ahead, the NYPD car rear-ends it with enough force to jolt it forward a few feet, the 66-second clip shows.

The driver of the cop car then threw it in reverse and bumped the grill of the third car in line.

Just as the lead car started to pull over to the curb, the cop car accelerated again, smashing into the back left side of the car, jarring it 90 degrees, and dragging it out of frame as shocked passersby scrambled.

Another angle of the aftermath shows the crumpled front of the NYPD car — which bore markings indicating it was from Traffic Enforcement Queens North — with fluid dripping from near the front right wheel well.

An NYPD spokeswoman confirmed the collision, and said that responders arrived on scene to find the driver appearing out of it.

“The driver of the vehicle appeared disorientated and was transported by EMS to an area hospital for further medical evaluation,” the spokeswoman said. “The incident remains under internal review.”