Four women who spent more than a decade in prison after being wrongfully convicted of sexually assaulting two girls were declared innocent and exonerated on Wednesday by Texas’s highest criminal court.

“These four women have unquestionably established that they are innocent of these charges,” Judge David Newell wrote in a majority opinion of the Texas court of criminal appeals. “Those defendants have won the right to proclaim to the citizens of Texas that they did not commit a crime. That they are innocent. That they deserve to be exonerated.”

The “San Antonio Four” were convicted of gang-raping the girls at an apartment in the city largely as a result of scientific evidence that was later discredited and retracted by the state’s expert witness. One of the girls, who were seven and nine at the time of the alleged offense in 1994, recanted her accusation in an interview with the San Antonio Express-News in 2012.

“It couldn’t be more clear that they are acknowledging and declaring that these women are factually and legally innocent and that’s obviously what we have been fighting and struggling for,” said Mike Ware, an attorney with the Innocence Project who represented them.

The outcome will allow the four to seek compensation from the state that could amount to $80,000 each for every year spent in prison. It follows a long effort by the women and their supporters to win their release and clear their names.

As evidence mounted that the convictions were faulty, the girls’ aunt, Elizabeth Ramirez, Cassandra Rivera and Kristie Mayhugh were granted bail in 2013, and Anna Vasquez was paroled in 2012. All are in their early forties. Ramirez, who was pregnant when accused, was sentenced to 37 and a half years in prison in 1997 and the other three women to 15 years in 1998. The women were subject to bail restrictions, such as requiring permission to leave the San Antonio area.

“I think maybe it hasn’t sunk in yet but we are so excited and so happy,” said Rivera, who said she cried with joy after seeing the news posted on Facebook on Wednesday morning while having coffee with her brother.

“It means everything to me, to my family. I have a son and a daughter and I do not want them living with the fact that I had been charged with a crime I did not commit, especially one such as child molestation,” she said.

“I have so much to be thankful for already because I have my children back in my life, I have a beautiful family that has always been supportive. I’m thankful [for] every day that I’m given because I was taken from them for 14 years so when I got this news this morning it’s like ‘wow, this year we’re going to have a beautiful Thanksgiving because we have so much more to be thankful for.”

The case emerged toward the end of the “satanic panic” era, when fear swept the US that ritualistic child abuse was rampant and innocent people became ensnared in a climate likened to a modern-day witch-hunt.

Nancy Kellogg, the expert witness who examined the girls, wrote in her notes that what she supposedly saw “could be satanic-related”.

Vasquez said earlier this year that homophobia may have been a factor in the prosecution and conviction. “When we were being questioned by police, they made a point to put it out in there – that we were gay,” she said.