AUSTIN, Texas -- Gay spouses may not be entitled to government-subsidized workplace benefits, the Texas Supreme Court ruled Friday in a unanimous decision that was quickly condemned by gay-rights groups.

The court overturned a lower court's decision that favored same-sex marriage benefits, ordering the issue back to trial. Social conservatives hope the case will help them chip away at the U.S. Supreme Court's landmark ruling legalizing gay marriage.

Gay rights groups denounced the ruling as an "absurd distortion" of established law regarding marriage equality.

Get Breaking News Delivered to Your Inbox

"Marriage is marriage and equal is equal. We will take steps to protect these families," said Kenneth Upton Jr., Dallas-based attorney for Lambda Legal.

Friday's decision was a major reversal for the all-Republican Texas high court, which previously refused to even consider the benefits case after the U.S. Supreme Court ruled that the Constitution grants gay couples who want to marry "equal dignity in the eyes of the law."

The Texas court only agreed to hear it after coming under intense pressure from Gov. Greg Abbott, Lt. Gov. Dan Patrick and Attorney General Ken Paxton, as well as dozens of other conservative elected officials, church leaders and grassroots activists. They filed a flurry of briefs saying the case may help Texas limit the scope of the Supreme Court ruling - especially in how it's applied to states.

The decision didn't block same-sex spousal benefits but said the U.S. Supreme Court decision did not decide the issue. The U.S. Supreme Court "did not hold that states must provide the same publicly funded benefits to all married persons," the Texas Supreme Court's wrote in its opinion.

The case came from Houston, where a coalition of religious and socially conservative groups sued America's fourth-largest city in 2013 to block a move to offer same-sex spousal benefits to municipal employees.

The groups argued that the U.S. Supreme Court didn't declare spousal benefits a fundamental right of marriage, and that it should be up to states to decide. The city argued that the gay marriage ruling meant all marriages are equal, so anything offered to opposite-sex couples must be offered to same-sex ones.

The groups suing also called the case a chance for Texas to defend religious liberty. Texas voters approved a gay marriage ban in 2005.

Jared Woodfill, a conservative activist at the center of the case, called the decision a big victory for states' rights and religious rights. He said he hopes the case will eventually help push the U.S. Supreme Court to someday overturn its gay marriage ruling.

"Courts can change their mind," Woodfill said. "From time immemorial, family law has been left to the states."

Conservative activists will argue to the trial court that the decision to offer same-sex benefits was an overreach by the Houston mayor's office that violated state law, and that benefits shouldn't be supported by taxpayers who would consider it a violation of sincerely held religious beliefs, Woodfill said.

Gay rights groups noted that the Texas decision came just days after the U.S. Supreme Court narrowly ruled that states may not treat married same-sex couples differently when issuing birth certificates. That decision overturned an Arkansas court ruling that said married lesbian couples were not entitled to have both spouses listed on their children's birth certificates.

Sarah Kate Ellis, president and chief executive of GLAAD, an LGBT rights group, called the Texas ruling a "warning shot to all LGBTQ Americans that the war on marriage equality is ever-evolving, and anti-LGBTQ activists will do anything possible to discriminate against our families."