A Brooklyn sergeant was arrested Wednesday for allegedly raping a teenage girl he met online, prosecutors said.

The cop, Joel Doseau, 43, was charged on 40 counts, ranging from sexual misconduct, sexual abuse, rape, and the use of a child in a sexual performance, investigators said.

The victim, now 23, said the relationship began when she was 14 and lasted three years. Though she was out of state at the time, the cop allegedly convinced her to send him provocative photos and come to his apartment. At 15, they allegedly began to have sex, reported The New York Times.

After serving the Police Department for 12 years, Doseau was stripped of his weapon and pay, police said. After his arrest, he was arraigned at the State Supreme Court in Brooklyn before Justice John G. Ingram where a grand jury concluded a sexual relationship occurred, reported New York Daily News.

He was released on bail after paying his $100,000 bond. His next court date is scheduled for October 1st. 

The girl's identity has been concealed after she filed a complaint a few months ago. She ended the relationship at 17, the legal age of consent in the state.