A New York man was arrested on Friday after he allegedly tried to pull over a van while pretending to be a police officer except there was reportedly one problem: the van was filled with detectives.

Valiery Portlock, 25, turned on emergency lights and sounded an airhorn in Hicksville, a city on Long Island roughly 30 miles east of New York City, on a roadway Friday morning as he tried to pull over a van, investigators said.

POLICE LOOK TO GRILL CHEESE BANDIT AFTER $187G THEFT, OFFICIALS SAY

Valiery Portlock, 25, was arrested last week for allegedly pulling over a van of police officers while pretending to be a police officer, officials said. (Nassau County Police Department)

That van was  full of detectives from the Nassau County Police Department's electronics squad, according to News 12 Long Island.

As detectives identified themselves, Portlock allegedly tried to flee the scene. Authorities claim he drove away, swerved into oncoming traffic and eventually sped to the Long Island Expressway, where he was stopped by the highway patrol.

CLICK HERE TO GET THE FOX NEWS APP

Portlock was arrested without incident and charged with criminal impersonation, reckless endangerment and fleeing the police. He was released from custody on his own recognizance following an arraignment on Saturday.

The Associated Press contributed to this report.