BIRMINGHAM, Ala. — Alabama’s stand against same-sex marriage regained ground Wednesday after the state’s highest court ruled that its ban remains legal, despite federal court pressure to begin issuing licenses to gays and lesbians. But advocates said they’re not giving up either – and that the justices in Montgomery will find themselves on history’s losing side.

The Alabama Supreme Court ordered county probate judges to uphold the state ban pending a final ruling by the U.S. Supreme Court, which hears arguments in April on whether gay couples nationwide have a fundamental right to marry.

Stuck between the state’s highest court and a series of federal rulings, many probate judges were at a loss early Wednesday. Mobile County, one of the state’s largest, initially announced that it wouldn’t issue licenses to anyone, straight or gay.

By mid-day, gay rights advocates couldn’t find a single county still granting licenses to same-sex couples.

Montgomery County Probate Judge Steven Reed, a Democrat and one of the first to comply with U.S. District Judge Callie Granade, said he was duty-bound to turn gays and lesbians away again, for now. But he also suggested that he would join a new round of appeals.

“I feel pretty safe in saying we will be filing something with the court,” Reed said.

The all-Republican court ruled 7-1 that Alabama’s 68 probate judges must stop issuing marriage licenses to gay and lesbian couples, despite a ruling by U.S. District Judge Callie Granade in Mobile that the ban is unconstitutional.

They gave probate judges five days to respond, but speaking out could be politically risky in the conservative state, where Alabama’s justices and probate judges must run for office after each term.

Same-sex couples will likely appeal up to the U.S. Supreme Court, said Ben Cooper, chairman of Equality Alabama.

“It’s important to understand that this is not nearly the end of this,” he said.