WASHINGTON (AP) — Just two years ago, the Supreme Court struck down part of the federal anti-gay marriage law that denied a range of government benefits to legally married same-sex couples.

The decision in United States v. Windsor did not address the validity of state marriage bans, but courts across the country, with few exceptions, said its logic compelled them to invalidate state laws that prohibited gay and lesbian couples from marrying.

The number of states allowing same-sex marriage has grown rapidly. As recently as October, just over one-third of the states permitted same-sex marriage. Now, same-sex couples can marry in 36 states and the District of Columbia.

The court is expected to decide late this week or early next week whether gay and lesbian couples have a right to marry in every state. A look at what is now before the Supreme Court, and the status of same-sex marriage around the country:

___

WHAT'S LEFT FOR THE SUPREME COURT TO DO AMID ALL THIS CHANGE?

Four states, Kentucky, Michigan, Ohio and Tennessee, had their marriage bans upheld by the federal appeals court in Cincinnati in November. That appeals court is the only one that has ruled in favor of the states since the 2013 Windsor decision.

___

WHAT'S AT STAKE?

Two related issues would expand the marriage rights of same-sex couples. The bigger one: Do same-sex couples have a constitutional right to marry or can states continue to define marriage as the union of a man and a woman? The second: Even if states won't allow some couples to marry, must they recognize valid same-sex marriages from elsewhere?

___

WHAT ARE THE MAIN ARGUMENTS ON EACH SIDE?

The arguments of marriage-rights supporters boil down to a claim that states lack any valid reason to deny the right to marry, which the court has earlier described as fundamental to the pursuit of happiness. They say state laws that allow only some people to marry violate the Constitution's guarantee of equal protection under the law and make second-class citizens of same-sex couples and their families. Same-sex couples say that preventing them from marrying is akin to a past ban on interracial marriage, which the Supreme Court struck down in 1967.

The states respond that they have always set the rules for marriage and that voters in many states have backed, sometimes overwhelmingly, changes to their constitutions to limit marriage to a man and a woman. They say a lively national debate is underway, and there is no reason for courts to impose a solution that should be left to the political process. The states also argue that they have a good reason to keep defining marriage as they do. Because only heterosexual couples can produce children, it is in the states' interest to make marriage laws that encourage those couples to enter a union that supports raising children.

___

IS THE OBAMA ADMINISTRATION PLAYING A ROLE?

The administration is backing the right of same-sex couples to marry, although its argument differs in one respect. The plaintiffs say that the state laws should fall, no matter what standard the court applies. The administration calls for more rigorous scrutiny than courts ordinarily apply to most laws, saying it is appropriate when governments discriminate against a group of people. That already is the case for claims that laws discriminate on the basis of race, sex and other factors. But the administration is silent about what the outcome should be if the court does not give gays the special protection it has afforded women and minorities.

The Justice Department's decision to stop defending the federal anti-marriage law in 2011 was an important moment for gay rights and President Barack Obama declared his support for same-sex marriage in 2012.

___

WHAT HAPPENS IF THE COURT STRIKES DOWN THE STATE BANS?

A ruling that same-sex couples have a right to marry would invalidate the remaining anti-gay marriage laws in the country. If the court limits its ruling to requiring states to recognize same-sex unions, couples in states without same-sex marriage presumably could get married elsewhere and then demand recognition at home.

___

WHAT HAPPENS IF THE COURT RULES FOR THE STATES ON BOTH QUESTIONS?

The bans in 14 states would survive. Beyond that, confusion probably would reign. Some states that had their marriage laws struck down by federal courts might seek to reinstate prohibitions on gay and lesbian unions. Questions also could be raised about the validity of some same-sex weddings. Many of these problems would be of the Supreme Court's own making.

___

WHY IS THAT?

From October to January, the justices first rejected appeals from states seeking to preserve their marriage bans, then allowed court rulings to take effect even as other states appealed those decisions. The result is that the court essentially allowed the number of states with same-sex marriage to double.

___

WHERE IS SAME-SEX MARRIAGE LEGAL?

Same-sex couples can marry in 36 states, the District of Columbia and parts of Missouri. More than 500 marriage licenses were issued to same-sex couples in Alabama this year after a federal court struck down the state's ban. But probate judges have not issued any more licenses to gay and lesbian couples since the Alabama Supreme Court ordered a halt to same-sex unions in early March.

Gay and lesbian couples may not marry in Alabama, Arkansas, Georgia, Kentucky, Louisiana, Michigan, Mississippi, most of Missouri, Nebraska, North Dakota, Ohio, South Dakota, Tennessee and Texas.

___

HOW MANY MARRIED SAME-SEX COUPLES ARE THERE IN THE U.S.?

UCLA's Williams Institute estimates that there are 390,000 married same-sex couples. If the court finds a right to marry, another 70,000 couples living in states that do not currently permit them to wed would get married in the next three years, the Williams Institute estimates. There are roughly 1 million same-sex couples, married and unmarried, who live together in the United States, the institute says.

___

WHAT ARE THE NEXT ISSUES FACING GAY RIGHTS?

One fight in the news this year is over efforts to carve out religious exemptions for people and institutions that object to same-sex marriage. It is clear that churches do not have to marry same-sex couples if doing so violates their religious tenets, but what about county clerks? Can photographers refuse to shoot same-sex weddings? Can bakers decline to bake a cake for two men? Civil rights groups say they will continue pressing for other protections from discrimination against LGBT people in employment and housing, among other areas. Even if same-sex couples win the right to marry everywhere, people still can be fired because of their sexual orientation in more than half the states.

____

Follow Mark Sherman on Twitter at: http://www.twitter.com/shermancourt

___

Online:

Supreme Court: http://www.supremecourt.gov