A Florida man was arrested in the Tampa Bay area Tuesday after police said he pulled over an undercover detective while pretending to be an officer.

Matthew Joseph Erris, 26, was in his 2007 white Chevrolet Trailblazer when he allegedly turned on red and blue lights in order to pull over another driver, according to the Hillsborough County Sheriff's Office.

Matthew Erris was arrested after impersonating a police officer while attempting to pull over an undercover detective in Hillsborough County, Florida. Hillsborough County Sheriff's Office

That other driver happened to be an undercover detective with the sheriff's department, who then called the 911 dispatcher to report an unusual traffic stop. The detective kept track of Erris' vehicle until sheriff's deputies could respond.

When deputies searched the Trailblazer, they found an airsoft gun in a holster that looked like a pistol and found that Erris' vehicle had a light bar installed at the top of the SUV.

Erris was charged with impersonating an officer and released Thursday on a $2,000 surety bond, according to an arrest report.

The sheriff's department asked that anyone who may have been a victim of Erris to contact their office.