Nearly three years after the U.S. Supreme Court legalized same-sex marriage nationwide, the city of Houston continues to battle for the rights of its gay workers.

On Tuesday, a judge struck down Houston's attempts to defend its city benefits policy in federal court. The case will be remanded to state court, and the city will have to pay the legal fees of the two men who sued to overturn the policy, which extends spousal benefits to partners in same-sex marriages.

The outcome of the case will be limited to the city of Houston. A similar Dallas policy has not been challenged.

But the fight is a good example of the war waged to erase, erode or at least stop the expansion of LGBT rights since since the 2015 marriage ruling, said Noel Freeman, the first city of Houston employee to receive spousal benefits for his husband.

"These are people who are never, ever going to give up. They are going to go to their grave hating us," Freeman told The Dallas Morning News on Wednesday. "And there is no court case ... that's going to change their minds.

"That's just the way it is."

Pidgeon vs. Parker

The Houston case dates to 2013, when then-Mayor Annise Parker extended benefits for city workers to their same-sex spouses. Houston pastor Jack Pidgeon and local accountant Larry Hicks sued Parker, who is openly gay, saying city employees did not have a "fundamental right" to benefits funded by taxpayer money.

While gay marriage has been legal since 2015, the Texas Supreme Court ruled last year that it was unclear what other rights gay couples had. The city appealed that decision to the U.S. Supreme Court, which declined to hear the case and kicked it back to Texas in December.

In a last-ditch effort to shift the fight to federal court, Houston asked earlier this year that the case be moved to the Southern District. On Tuesday, U.S. District Judge Kenneth Hoyt ruled that the city had not proved federal court was the proper venue and ordered it to pay Pidgeon and Hicks' legal fees.

The case will be remanded to state District Court in Harris County. Married gay city employees will continue to receive benefits for their spouses until a final ruling.

Plaintiffs' attorney Jonathan Saenz called the ruling a victory for taxpayers.

"This is the fourth time that a court has ruled against the city of Houston in this case," said Saenz, who is also president of Christian advocacy group Texas Values. "It's utterly irresponsible that the city of Houston continues to violate the law and spend thousands and thousands of taxpayer dollars on a legal matter that they keep losing."

Alan Bernstein, spokesman for current Mayor Sylvester Turner, said the fight is not over.

"We are surprised by the district court's ruling," Bernstein told The News. "Wherever the case is litigated, the city will protect the rights of city employees under United States Supreme Court case law."