HOUSTON (AP) Houston must repeal a newly adopted equal rights ordinance or let voters decide if they want to ban discrimination based on sexual orientation and gender identity, the Texas Supreme Court ordered Friday.

The ruling was not about the merits of the ordinance, which is similar to what other big Texas cities have adopted, and aim to protect gay and transgender people against discrimination in employment and public places.

The all-Republican court instead decided that conservative activists should have succeeded in a petition drive to put the issue on a ballot.

"The legislative power reserved to the people of Houston is not being honored," the court wrote.

The court ordered the city to repeal the ordinance by Aug. 24 or let voters decide the issue in November. Houston Mayor Annise Parker, who is gay and pushed for the ordinance passed by the City Council last year, said in a statement she was disappointed and was still consulting with lawyers.

But, Parker added, "I have never been afraid to take it to the voters. We will win!"

Last year, opponents who have fought the ordinance from the start say they obtained the roughly 18,000 signatures required to force a voter referendum.

But council members said too many signatures were invalid, even though the city secretary certified the petition. A lawsuit was filed by the former chairman of the Harris County Republican Party, and justices on Texas' highest civil court ruled that the petition should have held up.

Republican Gov. Greg Abbott, a former justice on the court, praised the ruling as a reassurance of personal values.

"Freedom of expression can only exist once government removes itself from stifling free speech, repressing religious liberty and interfering with the lives of its citizens," Abbott said.