An upstate woman who traveled to the Big Apple for a night out on the town was raped by her date — a man who claimed to be an NYPD officer, sources told The Post.

The pair spent Friday night bar-hopping in Astoria, and eventually wound up on Staten Island, possibly at the man’s home, at around 4 a.m., police sources said. There, he exposed his genitals, tore off her clothing, and raped her, the sources said.

After the attack, the man, who the 21-year-old victim knew only as “Benji,” drove her to a friend’s house in the Bronx, she told investigators. She then went to Montefiore Medical Center for a rape kit test, sources said.

It was not clear how the pair had met, though sources told The Post they had exchanged messages online for at least a month before meeting in person.

During their courtship, the man claimed he was a cop — and even tried to prove it by sending her a photo of himself in uniform, according to sources.

No arrests have been made. The NYPD’s Internal Affairs Bureau is investigating the incident to determine whether the alleged rapist is indeed a police officer, officials said.