A 40-year-old Philadelphia police officer was arrested Friday for an alleged sexual assault on an underage female, the department said.

Rahim Montgomery, who has been on the force for 20 years and most recently was assigned to Center City, has also been suspended for 30 days, and afterward will be dismissed, the department said.

Montgomery was arrested following an Internal Affairs investigation of a complaint reported in July of an alleged sex assault that occurred about five years ago, when the female was a minor.

He was charged with unlawful contact with a minor, indecent assault, indecent exposure, and corruption of minors.

Montgomery could not be reached for comment.

John McNesby, president of the police officer’s union in Philadelphia, the Fraternal Order of Police Lodge 5, declined to comment.

Montgomery’s name appeared on a list maintained by former District Attorney Seth Williams of “problem” cops. The list was published by the Inquirer in 2018.

Montgomery, “while off-duty, destroyed property inside his home and assaulted his spouse,” according to the description that appeared on the list. It said Montgomery had been “[f]ound guilty of unspecified conduct unbecoming” and punished with a 10-day suspension.

While some current and former officers on the list were flagged as problematic for testifying in court, Montgomery received no such designation.