On Monday, gay couples will be able to do something that many of them doubted they would see in their lifetimes - apply for marriage licenses.

Barring an intervention from the U.S. Supreme Court today - and the court's deputy clerk told lawyers he did not expect the justices to act over the weekend - a ruling last month by U.S. District Judge Callie V.S. Granade in Mobile will take effect Monday morning. The Alabama Department of Public Health last week distributed new marriage license forms to probate offices replacing "bride" and "groom" with "first listed spouse" and "second listed spouse."

Based on estimates from the U.S. Census Bureau in 2010, there could be 6,500 gay couples in Alabama who might want to get married.

Here is a look at how Alabama got here and what to expect over the next few days and months.

The background: In 1998, the state Legislature passed the Alabama Marriage Protection Act, defining the institution as "a unique relationship between a man and a woman." In 2005, the state joined a movement sweeping the country to strengthen marriage laws in the wake of a state court decision legalizing the practice in Massachusetts.

Lawmakers voted overwhelmingly to put the same-sex marriage ban in the state constitution, and 81 percent of voters backed it the following year.

The challenges: Three lawsuits joined dozens across the country challenging the constitutionality of prohibiting gay marriage. In Mobile, Cari Searcy and Kim McKeand, who legally married in California in 2005, sued to challenge a probate judge's ruling in 2011 denying Searcy's second-parent adoption petition involving the boy she and McKeand have raised since birth.

In Montgomery, Paul Hard sued to try to force the state to recognize his out-of-state marriage to a man who had died in a traffic accident. Being recognized as a spouse would guarantee him money from a civil suit over that car wreck.

In Birmingham, April and Ginger Aaron-Brush sued to have their Massachusetts marriage recognized in their home state and allow Ginger to co-adopt a girl legally adopted by April.

Many months after those suits, James Strawser and John Humphrey - without a lawyer - filed a lawsuit challenging the state's refusal to issue them a marriage license.

The ruling: Granade was the first federal judge in Alabama to rule. On Jan. 27, she declared in the Searcy-McKeand case that the marriage law and the amendment violated the U.S. Constitution's Due Process Clause and the 14th Amendment's Equal Protection Clause. The following Monday, she ruled in favor of Strawser and Humphrey. She put both decisions on hold until Feb. 9 to give the state a chance to appeal.

In ruling, Granade joined more than 60 federal judges who have reached the same conclusion. That includes almost all of the district judges who have ruled and four of five appellate courts that have weighed in on the matter.

The Atlanta-based 11th U.S. Circuit Court of Appeals declined to lift or extend that "stay" and also ruled that it would not decide the merits of the appeal from Alabama or Florida until after the U.S. Supreme Court rules on a gay marriage appeal from Cincinnati.

The high court is expected to decide that case - and settle the issue nationwide - by this summer. In the meantime, by not ruling, the justices effectively rebuffed a request by Alabama to keep Granade's ruling on hold.

The marriages: Beginning Monday, Alabama officially becomes the 37th state, plus the District of Columbia, to issue marriage licenses to gay couples. Among states in the Deep South, only South Carolina also is granting licenses to gays and lesbians.

State agencies also will have to prepare for changes that range from adoption to joint tax returns.

It is impossible to predict how many couples might line up outside of probate offices, or apply for marriage licenses over the rest of the year. The Williams Institute at UCLA School of Law, using U.S. Census Bureau data, estimates that there are 6,582 gay couples living in Alabama.

Gay rights groups have been compiling lists of ministers and others who will perform marriage ceremonies for gay couples.

The continued fight: Just because same-sex marriages start Monday does not mean the fight is over. Alabama Gov. Robert Bentley and Attorney General Luther Strange both have vowed to continue fighting gay marriage in the courts.

Just because the Supreme Court has not stopped gay marriages does not mean it cannot reinstate same-sex marriage bans. If it upholds the ruling by the Sixth U.S. Circuit Court of Appeals, it likely means that states across the country will again be able to deny marriage licenses to same-sex couples and refuse to recognize legal marriages from other states.

Less clear is what would become of all marriages that have taken place over the past few months, although some analysts predict that those marriages would be grandfathered in.

Beyond what the Supreme Court does, resistance at the state level seems likely. Alabama Supreme Court Chief Justice Roy Moore has advised probate judges to ignore the federal court ruling and uphold Alabama law. That has drawn a judicial ethics complaint against him.

Some probate judges have criticized the federal court ruling, and others have said they will not perform wedding ceremonies anymore. Some also vowed they would stop issuing marriage licenses, although it is unclear how many probate judges intend to follow Moore's advice to defy the court order.

Some legal experts said over the weekend that probate judges who defy the federal court risk contempt charges, fines and even jail time.