…that awkward moment when your attempted con totally backfires…

In Rancho Cucamonga, California, police say a man made a big mistake on Thursday. Video released by the police department shows a traffic stop where police say a fake cop tried to pull over a real cop in Upland.

In the video, you could see the lights from an accused police impersonator’s Jeep Wrangler.

Police say 23-year-old Imroj Singh made a big mistake when he flipped on his red and blue lights while unknowingly trying to stop a detective.

That detective was in an unmarked car on the 210 Freeway near Baseline Street, and as soon as the Rancho Cucamonga detective realized the man wasn’t an officer… he put on his real lights and sirens.

The Jeep sped off, but the detective gave chase. Eventually the driver stopped and got out.

According to police, Singh bought the police lights on the internet and had them installed in his vehicle’s front grill to make it look like he was an undercover law enforcement vehicle.

Singh was arrested by the detective and is now facing a misdemeanor charge for impersonating a peace officer – police say he’ll be arraigned on August 5.

There may be more to the story. Detectives do not think it’s the first Singh used the police lights to stop people.

Anyone with information is being asked to call the Rancho Cucamonga Police Detective Division at 909-477-2800… or anonymously at the We-Tip hotline at 1-800-78-CRIME.

THE STORIES OF PROTECTORS. OF PATRIOTS. OF PROUD VETERANS AND THEIR SUPPORTERS. JOIN THE FAMILY – CLICK TO BEGIN

Back in February, a man impersonating a police officer was shocked when he realized a vehicle he tried to stop was the County Commissioner and former cop, reported NBC 6 Miami news.

Miami-Dade Commissioner Joe Martinez knew something wasn’t right when an SUV with flashing lights attempted to pull him over on the Florida Turnpike on Wednesday. Martinez noticed that the vehicle wasn’t equipped with standard lights and that it was sporting a temporary tag.

Martinez refused to comply and was able to get the attention of an officer on the side of the road, who radioed into dispatch.

JUST IN: Police impersonators tried to stop Miami-Dade Commissioner Joe Martinez on SR-836, according to sources – https://t.co/GeOpPuHDT1 — NBC 6 South Florida (@nbc6) February 13, 2019

The man, Franklin Dixon-Lozano, 27, was arrested and taken into custody. He faces charges of falsely impersonating an officer and also possessing a firearm while committing an offense, said police.

“I thank God it was me that they tried to stop for the simple reason that I know more or less what could be going on,” Martinez said. “Could you imagine a young person or elderly person who just got their license, they probably would have stopped and then what could have happened?”

Joe Martinez is the County Commissioner in District 11 of Miami-Dade and served as a former police officer in the area.

Dixon-Lozano’s bond has been set at $15,000.