A veteran Philadelphia police officer has been arrested and will be fired for allegedly stalking a woman he previously had dated, authorities said Wednesday.

Robert McDonald Jr., 45, who has been on the force 22 years, was arrested Wednesday by the department’s Internal Affairs Division and charged with stalking and harassment, both misdemeanors.

Acting Police Commissioner Christine Coulter suspended McDonald for 30 days with the intent to dismiss, the department said. McDonald had been assigned to the 15th District with headquarters at Harbison Avenue and Levick Street in the Northeast.

His arrest resulted from incidents of stalking and harassment this spring and summer, the department said. The victim is a woman McDonald had dated, and they broke up in 2015 or 2016, a law enforcement source said.

McDonald had been harassing and stalking the woman ever since, repeatedly driving around her house and yelling at her, the source said. Internal Affairs investigators began surveilling McDonald earlier this year, the source said.

Jane Roh, spokesperson for Philadelphia District Attorney Larry Krasner, said the office could not comment on McDonald’s arrest because the investigation is still open.

“We do commend the Philadelphia Police Department for their investigative work that resulted in this arrest, and we encourage members of the public who wish to file a criminal complaint to contact the Police or the District Attorney’s Office Special Investigative Unit hotline: 215-686-9608,” she said.

McDonald is the second Philadelphia police officer to be charged with a crime this month.

Earlier this month, narcotics officer James Coolen Jr., 45, a 24-year veteran of the force, was charged with unauthorized use of an automobile and misapplication of entrusted property for using a 2018 Porsche to drive his stepdaughter to take pictures for her school prom.