A Chicago police officer who admitted to paying for sex with girls as young as 14 — including one with braces on her teeth — was sentenced Thursday to 25 years in federal prison.

U.S. District Judge Virginia Kendall also ordered 62-year-old William “Willie” Whitley to pay $240,000 into a trust fund for his four victims, one of whom faced the 26-year CPD veteran at a hearing last week.

“I question everyday if police officers are here to protect and serve or to take advantage of people,” the victim identified only as “Minor A” told Whitley in court on Sept. 4. “Can you live the rest of your life knowing what you did and how it affected young people this way?”

Whitley’s attorney could not immediately be reached for comment Thursday.

Whitley, who pleaded guilty in May to one count of sex trafficking of a minor, could have faced up to a lifetime sentence. He most recently was assigned to the Wentworth District on the South Side before being stripped of police powers in September 2015.

His current status on the department was not known.

That month, a 14-year-old girl arrested during an FBI sex trafficking investigation told authorities about her “johns,” who included Whitley, according to a criminal complaint. The girl said she was introduced to him in June 2015 and had sex with him about five times, collecting between $60 and $150 from him each time.

She said he kept his uniform hanging on his bedroom door, kept a gun under the pillow while they had sex, wore a gold chain with the CPD logo on it and sometimes bragged about being a cop.

When questioned, Whitley acknowledged he saw braces on that girl’s teeth and paid her for sex, saying he did not know her age and that she told him she was 23.

The feds said Whitley was in touch with the girl by phone “hundreds of times” over the summer of 2015. Once, after he began texting the girl, she replied, “Awww ok wassup then.” And he replied, “You already know” and added, “B4 I gotta work.”

The girl also said Whitley took naked photographs of her inside his apartment.

The then 14-year-old girl led authorities to a 16-year-old girl who also said she had sex with Whitley for money. The 16-year-old said Whitley pulled up next to her and a friend once in Englewood and asked if they wanted to take a ride with him and “his partner.”

In all, Whitley paid four girls for sex between 2012 and 2016, prosecutors said. Three were considered runaways.

“I’ve been through a lot and done a lot of things I wasn’t supposed to do,” “Minor A” told Whitley at last week’s hearing. “But I am the person that you are supposed to be helping.”