A man charged with fatally shooting his ex-girlfriend and wounding her boyfriend after breaking into her Cheyenne home in April 2015 has pleaded guilty.

Daniel Guajardo, whose murder trial was scheduled to begin Monday, admitted Friday in Laramie County District Court that he shot and killed 26-year-old Janessa Spencer.

The 28-year-old also admitted he tried to kill Sam Cook, Spencer's 24-year-old boyfriend at the time.

Guajardo was facing first-degree murder and attempted first-degree murder charges, but those charges were lessened to second-degree counts as part of a plea deal.

Guajardo is facing 20 years to life for each second-degree count. He's also facing up to 30 years in prison for a jail assault that occurred in July 2015.

His sentencing will be set before Laramie County District Court Judge Catherine Rogers as soon as a pre-sentence investigation is complete.