A Chula Vista man pleaded guilty Tuesday to second-degree murder in the 2012 death of his girlfriend who was repeatedly stabbed to death.

Michael Rodriguez Chavez, 22, will receive a “stipulated” sentence of 17 years to life in state prison for killing Yesenia Lynn, 21, said Deputy District Attorney Enrique Camarena.

Chavez admitted to killing Lynn, who was stabbed 36 times and found in her residence in the 1100 block of Morgan Hill Road in Chula Vista on Dec. 1, 2012, said Camarena.

The guilty plea came before he was about to have a preliminary hearing in Chula Vista Superior Court. Judge Stephanie Sontag set sentencing for Oct. 11.

Chavez and Lynn had a 3-year-old daughter who is now staying with her maternal grandmother. Chula Vista Police officers found Chavez at the scene and persuaded him to come out of the house with the girl.

Chavez gave no reason for killing Lynn after his arrest, Camarena said. Officers found Lynn’s body in an upstairs bedroom.

Because the girl may have witnessed the slaying, Chavez was also charged with felony child endangerment and with domestic violence in an earlier incident. Those charges were dropped after his guilty plea to second-degree murder.

Chavez remains in the George Bailey Detention Facility on $200,000 bail.