A 10-year veteran of the Los Angeles Police Department was busted for raping two women after he was accused of one assault — and his DNA then matched a second case from years ago, officials said Wednesday.

Officer William Rodriguez, 33 — who was most recently assigned to the Valley Traffic Division — was charged with two counts of forcible rape with a special allegation of multiple victims, the Los Angeles County District Attorney’s Office said.

The cop was first accused of raping a female acquaintance at his home on Nov. 1, prompting an investigation.

Officials entered his DNA into the state’s database and received a “cold hit” notification, linking him to another rape case from August 2015.

That assault involved a different woman and happened “under similar circumstances,” said the DA’s office.

Authorities said Rodriguez was off duty at the time of the alleged rapes. They didn’t provide any additional details about the cases, which remain under investigation.

“When one of our own breaks the trust of the people we are sworn to protect and to serve, it tarnishes the badge we all wear proudly on our chests,” LAPD Chief Michel Moore said in a statement, according to KTLA.

Rodriguez was arrested Tuesday and “relieved of his police powers,” the department said. He was being held at the Men’s Central Jail on $1.2 million bail and was scheduled to be arraigned Thursday, records show.

If convicted, he could face up to 30 years to life in state prison.