BIRMINGHAM, Ala. — Despite a federal judge’s rulings legalizing same-sex marriage, most probate judges in Alabama on Monday refused to issue marriage licenses to gay and lesbian couples, escalating a legal showdown that echoed the battles over desegregation here in the 1960s.

Although court officials in some of the state’s largest cities — including Birmingham, Huntsville and Montgomery — quickly issued marriage licenses to same-sex couples, up to 52 of Alabama’s 67 counties, according to the gay rights group Human Rights Campaign, declined to process the required paperwork.

It was unclear how many of the judges were acting out of overt defiance and how many were simply weighing how to navigate a freshly jumbled legal landscape after Chief Justice Roy S. Moore of the Alabama Supreme Court on Sunday ordered the judges not to issue marriage licenses to same-sex couples.

“We’ve got Alabama’s chief justice issuing an order, and we’ve got an order out from a federal judge,” said Judge Greg Norris of Monroe County, who is also president of the Alabama Probate Judges Association. “It’s just a very difficult situation.”