A former D.C. police officer was sentenced to 14 years in prison this week after he admitted to paying two ninth-grade girls for sex, prosecutors said.

Chukwuemeka Ekwonna, 29, of Glenn Dale, Md., pleaded guilty in January to two counts of sex trafficking of a minor.

Ekwonna admitted to corresponding with two girls — 14 and 15 — through text and social media in 2016 and 2017 to arrange meetings, at which he would have sex with them, according to court documents.

In his user profile on the Tagged account that he used to correspond with the girls, Ekwonna included a picture of himself in a police car wearing his uniform with his name tag, according to his plea agreement.

The meetings took place in motel rooms, his car and other locations in the Annapolis area, according to a statement from the U.S. attorney’s office in Maryland announcing the sentence.

In one instance, Ekwonna paid a 15-year-old girl $80 for sex acts in the back of his car, but afterward he “locked her in the car, pointed a black handgun at her and demanded she return the money he had paid her,” prosecutors said in a statement.

“We will continue to work with our law enforcement partners to bring human traffickers to justice and protect our most vulnerable,” U.S. Attorney Robert K. Hur said in the statement.

Tom Maronick Jr, who was an attorney for Ekwonna said, “I represented Mr. Ekwonna for part of the case and know him as a sincere person and one who always acted in such a way with me during my representation and with the Court. I cannot comment on the specific sentence or what led to it as I did not represent him at that stage of the representation.”

Ekwonna was a D.C. police officer for about 14 months before he was fired in April 2017, after he was charged.

When he applied to work for D.C. police, he had been part of a lawsuit that asserting that he beat an inmate when he worked before at the jail in the District. The lawsuit was settled for $20,000.

Justin Jouvenal contributed to this report.