NEW YORK (AP) — A New York man has been charged with rape after police say he impersonated a police officer and threatened the 18-year-old victim with arrest if she did not comply with his demands.

Police say 47-year-old Walter Barnes was arrested Wednesday.

According to police, the victim was walking to buy cigarettes in Brooklyn on Oct. 2 when Barnes allegedly pulled up in a car and offered her a lift. When she got inside, he allegedly produced a handheld radio and pretended to speak with police officers.

As they passed an NYPD van Barnes allegedly told the victim he knew the officers inside.

Police say the woman was sexually assaulted after the suspect twice threatened her with arrest.

It wasn't immediately known if Barnes had a lawyer.