Ten cops — including the commanding officer of a Queens precinct — were injured in a wild police chase that started when city sheriff’s officers tried to pull over a stolen car in Brooklyn, according to police.

The encounter unfolded around 9 a.m. Tuesday in East New York near Ridgewood and Shepard avenues, where the sheriff’s officers spotted a Honda Accord with a busted tail light, police said.

When sheriff’s officers ran the Pennsylvania plates, they also realized the Honda had been swiped from the New York City Marshals, which previously seized the car for nearly $800 in unpaid parking and speeding tickets, according to authorities.

The man had cracked the boot off the car and stolen it back from the city sometime after it was seized on Aug. 20, according to law enforcement sources.

The driver, who the Sheriff’s Office identified as Justin Valentine, initially stopped for the deputies but took off as the two approached the car.

Valentine sped away — only making it about a half-mile after crashing into four parked cars and into the back of an unmarked NYPD cruiser, with 104th Precinct commanding officer Capt. Victoria Perry inside.

And Valentine took off on foot into the Cypress Hills neighborhood near Chestnut Street and Jamaica Avenue.

The precinct boss tried to run down the man but hurt her back in the chase, cops said.

A 19-year-old woman who was a passenger in the car was taken into custody and her charges are pending, police said.

Another police car, with four cops inside, also responded to the call — but they were involved in a single-car crash in East New York, according to police sources.

The 25-year-old eventually was chased about three blocks to a two-story building at 51 Logan Avenue, where he was arrested by NYPD cops after threatening to jump, according to the police.

The New York City Sheriff’s Office — which usually handles repossession and the service of warrants but has full police power to issue tickets and make arrests — charged Valentine with reckless endangerment, criminal contempt of court, unauthorized use of a motor vehicle, disorderly conduct, obstructing governmental administration and criminal mischief.

The NYPD also charged Valentine with criminal contempt and trespassing.

All of the NYPD officers’ injuries were considered minor, police said.