police car
A representational image of police cars at a music bar where a gunman opened fire in Los Angeles, Nov. 7, 2018. JAVIER TOVAR/AFP/Getty Images

A Florida man was arrested Tuesday night when he attempted to pull over an undercover detective while pretending to be a police officer.

Matthew Erris, 26, turned on red and blue lights he had installed on the grill of his car in an attempt to pull over a vehicle in front of him. What Erris didn’t realize was the car’s driver was an undercover detective for the Hillsborough County Sheriff's Office.

According to police records, Erris works at a salvage yard as a dismantler.

The detective refused to pull over, and when Erris realized he wasn’t going to, he turned off the lights and drove past the detective. The officer then called 911, alerting police to Erris' activity. Erris was pulled over by a deputy not long after.

After taking Erris into custody, the deputy promptly searched the car, finding a law enforcement light bar and a realistic-looking airsoft gun. Erris also admitted to having a public address system installed with speakers on both sides of his car. He told the police officer he used the lights to get through heavy traffic.

Erris was booked at Hillsborough County Jail and released Thursday after posting $2,000 bail.

See posts, photos and more on Facebook.

According to Florida laws, impersonating an officer carries a fine of $5,000 to $10,000 and is punishable by anywhere from 5 to 30 years in prison if another felony was committed. Currently, it is unknown if Erris committed any other crimes and police are encouraging anyone who may have had an altercation with Erris to step forward.