AUSTIN, Texas (Reuters) - A federal appeals court ordered Texas on Wednesday to pay about $600,000 to cover the legal fees for two same-sex couples who defeated the state's ban on same-sex marriage in a protracted court battle.

The U.S. Court of Appeals for the Fifth Circuit awarded $585,470 in attorneys’ fees and about $20,000 in costs arising from the challenge to the plaintiffs in the case, Cleopatra DeLeon, Nicole Dimetman, Victor Holmes and Mark Phariss.

"We're thrilled. Our lawyers did an outstanding job," Phariss said in an interview.

"It's frankly a waste of taxpayer money to have fought the ability of two people who love each other to marry," he said.

Marc Rylander, a spokesman for the Texas attorney general's office, said in a statement: “We are disappointed in the ruling and are considering our next steps.”

The case, which wound its way through the U.S. court system, was pending in the Fifth Circuit when the U.S. Supreme Court made its landmark decision in June 2015, in the case known as Obergefell v. Hodges, that made gay marriage legal in the United States.

About a week later, the U.S. appeals court ruled in favor of the two couples in the Texas case.

(Reporting by Jon Herskovitz; Additional reporting by Jim Forsyth in San Antonio; Editing by Leslie Adler)