A cop’s tale about a scooter accident in Brooklyn just cost the city nearly $3 million, the victim’s lawyer told The Post on Monday.

Great-grandfather José Flores looked both ways, then started walking across the street at Liberty Avenue and Barbey Street in Cypress Hills in August 2012, the surveillance video below shows.

At around the same time, Police Officer Thomas Hopper was riding nearby on his NYPD scooter and appeared to lose control as he approached Flores.

The bike was already on its side, skidding into Flores, when it hit the elderly man and sent him flying, according to the video.

Hopper still issued a misdemeanor summons to the badly injured, retired refrigerator repairman for jaywalking, claiming that Flores darted out in front of him in the middle of the street between parked cars, said the victim’s lawyer, Steven Goldstein.

Flores, now 72, was actually crossing at a corner, and there were no cars around him at the time, according to the video.

He was even thrown in jail for three days because he had a 10-year-old warrant for an open container, according to court papers.

When a judge finally released Flores, he was hospitalized for four months to treat two fractured vertebrae, his Brooklyn Supreme Court suit says. The jaywalking charge was eventually dismissed.

He won the $2.9 settlement from the city just as the case was about to head to trial.

Hopper had already been suspended from the force in 2009 for pulling a gun on a fellow officer.