Police arrested a Tampa man for allegedly impersonating a police officer and attempting to pull over an undercover cop.

Matthew Joseph Erris, 26, had allegedly placed a flashing light bar on the roof of his Chevy Trailblazer and used the lights to try to pull over a Hillsborough County sheriff’s detective who was driving an unmarked car in Tampa Bay, Florida.

Erris attempted the pullover on Tuesday evening as he drove north on Paul Buchman Highway, the Daily Mail reported.

The officer did not immediately stop for Erris’s flashing lights, so the suspect sped up and drove beside the officer’s car with his lights flashing. The officer called in a uniformed officer to return the favor and had Erris pulled over, instead.

“Deputies did a REAL traffic stop on Erris,” the Sheriff’s Department wrote on its Facebook page Thursday, using the hashtags #FakeCop and #GotEm and including “OOPS.”

“OOPS,” the Hillsborough Sheriff’s Office wrote, adding:

When 26-year-old Matthew Joseph Erris decided to play cop, turn on his red and blue lights and pull somebody over, he had no idea the other driver was a REAL undercover HCSO detective! Deputies did a REAL traffic stop on Erris. They found an airsoft pistol under his passenger seat. Erris is now facing a charge for impersonating a law enforcement officer.

Authorities asked the public to let them know if the suspect pretending to be a police officer had ever pulled anyone else over.

Erris was booked and then released after posting $2,000 bail.

Follow Warner Todd Huston on Twitter @warnerthuston.