PORTLAND, Ore. (AP) — The Oregon Court of Appeals has overturned the 2017 murder conviction of a teen who fatally stabbed a woman as she hung flyers near an apartment complex.

The court overturned the conviction of Jaime Tinoco-Camarena on Wednesday, concluding that prosecutors shouldn’t have introduced testimony about his conviction in the 2014 rape of a woman in Eugene, The Oregonian/OregonLive reported.

He remains in custody at the Oregon State Penitentiary.

Tinoco-Camarena was accused of stabbing Nicole Laube outside a Cedar Mill apartment complex in August 2014. Tinoco-Camarena, who was 17 at the time and living with his parents across from the complex, wasn’t charged until nearly a year later, though he was an early suspect.

A jury convicted Tinoco-Camarena of aggravated murder and unlawful use of a weapon after deliberating for 45 minutes.

An Oregon Department of Justice spokeswoman said attorneys are reviewing the ruling.

Court documents show he confessed in 2015 to stabbing Laube while serving 18 years in state custody for the rape in Eugene and punching a teacher at the MacLaren Youth Correctional Facility.

He said he had planned to rape Laube but she screamed, according to the court documents.

If the case is retried and Tinoco-Camarena is re-convicted, his defense could seek a lighter sentence because juvenile laws have changed since his trial.