Impersonating a police officer can be tricky business. But pulling over a real officer is always a losing strategy.

Police said Anthony Kenneth Mastrogiovanni of Crofton learned that lesson Wednesday after he flicked on the police lights in the windshield of his white pickup truck and attempted a traffic stop in southbound Route 301 near Trade Zone Avenue, Prince George’s County police said.

Police said Mastrogiovanni pulled over an off-duty Capitol Heights officer driving in his private vehicle.

The officer identified himself to Mastrogiovanni, who in turn said he was a military police officer from Louisiana. Mastrogiovanni then told the officer he was speeding and the officer informed him he had no jurisdiction and that the blue-and-red emergency lights were illegal in Maryland, police said.

Mastrogiovanni fled in his truck, but the real officer followed as he called county police, who made the arrest.

Authorities charged Mastrogiovanni with impersonating a police officer and he was later released on his own recognizance, officials said.

More from The Washington Post:

Eight students arrested at Arlington high school

Va. man sentenced for scamming victims’ families

Va. officer fired, charged with murder while on-duty