AUSTIN, Texas — The Texas Supreme Court effectively upheld the Austin divorce of a same-sex couple Friday, turning away Republican Gov. Greg Abbott and arguments that the state can’t dissolve a marriage it didn’t recognize in the first place.

The court, which is entirely stocked with elected Republicans, ruled in a 5-3 decision that the state lacked standing to intervene in the divorce of Angelique Naylor and Sabina Daly, who were married in Massachusetts in 2004.

The ruling comes ahead of a U.S. Supreme Court decision that is expected any day now on whether same-sex marriage should be legal.

The Texas court largely sidestepped those bigger issues and ruled that the state lost because it waited too long to intervene.

The Texas Attorney General’s Office did not try to intervene in the case until after a Travis County judge granted the divorce. The ruling noted that the state was hardly “blindsided” and that it had, in fact, been monitoring the case but stayed on the sidelines for months.

Abbott, a former justice on the state Supreme Court, was attorney general when his office challenged the divorce. He called the ruling wrong.

“The Court mistakenly relied on a technicality to allow this divorce to proceed,” Abbott said in a statement Friday. “Importantly, the Supreme Court did not address the Texas Constitution’s definition of marriage – and marriage in Texas remains an institution between one man and one woman.”