AUSTIN, Texas (AP) Texas' highest criminal appeals court on Wednesday reinstated the 2015 sexual assault conviction of a former Baylor University football player whose case ignited a scandal that engulfed the nation's largest Baptist school.

The Texas Court of Criminal Appeals said a lower court erred by overturning the conviction of Sam Ukwuachu based on text messages between the victim and a friend that had not been allowed in trial.

The trial court only allowed into evidence texts the woman sent after the assault, in which she told a friend she had been raped. Ukwuachu's attorney argued earlier text messages exchanged between the woman and her friend would show the woman consented to sex.

The trial court considered the earlier texts, but ultimately decided not to allow them. Ukwuachu was sentenced to six months in jail, but served an abbreviated sentence. He also received 10 years' probation and was ordered to register as a sex offender. An appeals court ruling in 2017 said the text messages should have been allowed and ordered a new trial.

Wednesday's ruling allows Ukwuachu to continue appealing his conviction, but not on the text message issue. Ukwuachu has also claimed problems with the grand jury process and argued that testimony about other offenses should have not been allowed at trial.

"This is a great ruling, but truthfully is the only outcome that seemed consistent with Texas law," said John Clune, an attorney for the victim. "We realize the appeal process isn't over, but this is an important victory for crime victims and brings Mr. Ukwuachu one step closer to justice."

Ukwuachu attorney William Bratton III said he may ask the court to reconsider Wednesday's ruling. If unsuccessful, he will continue to press Ukwuachu's case in the lower appeals court on the other issues.

Ukwuachu transferred to Baylor from Boise State University in 2013 after being dismissed for unspecified reasons, but never played for Baylor. He was ineligible in 2013 after transferring and was suspended in 2014.

Media coverage of his case and the 2014 sexual assault conviction of another former player, Tevin Elliott, led the school to hire Philadelphia law firm Pepper Hamilton to investigate how the university and the football program handled reports of assault.

The internal investigation found that the football program operated as if it was "above the rules" and that assistant coaches and staff interfered or stifled investigations into alleged assaults by players. Football coach Art Briles, who had built the program into a Big 12 power, was fired. School President Ken Starr was demoted and later resigned.

Baylor has since then settled several lawsuits and still faces others that claim the school ignored or mishandled complaints of sexual or physical assault for years across the university.