The justices agreed to hear cases from Michigan, Kentucky, Ohio and Tennessee, where state officials are defending laws that limit marriage to a man and a woman. The court set aside 2 1/2 hours of arguments in April — compared with the usual hourlong session — with a decision expected by the end of June.
The outcome could be a landmark ruling giving gay and lesbian couples a right to marry nationwide under the Constitution's protections for individual liberty and equal treatment.
In an order released Friday, the court said it would decide two civil rights questions that have deeply divided Americans: Does the 14th Amendment include a right to marry for same-sex couples, and must states recognize same-sex marriages that took place in other states?
The issue "is coming to the court at the right time and the right circumstances," said Mary Bonauto, a Boston-based attorney who won the first state ruling for gay marriage, in Massachusetts in 2003.
The timing is no accident. The justices, both liberal and conservative, have long been wary of rulings that upset the settled expectations of the American public. The court didn't protect interracial marriage until 1967, long after most states had accepted it.
Likewise, the justices opted in recent years to avoid ruling directly on gay marriage, giving more time for the idea to be accepted and legalized by individual states.
By taking the case now, the justices put themselves in position to ratify a profound social change that they helped set in motion, but which they did not anticipate would occur so quickly.
Opinion polls in the last year have shown that a solid majority of Americans support a right to marry for same-sex couples. Currently, gay marriage is legal in 36 states and the District of Columbia, a product of political decisions and judicial rulings.
Evan Wolfson, president of Freedom to Marry, a gay marriage advocacy group, said the court's "decision today begins what we hope will be the last chapter in our campaign to win marriage nationwide."
Early in 2008, no state recognized same-sex marriages except Massachusetts. And voters, including those in California, had consistently opposed changing the marriage laws to legalize same-sex unions.
But the tide of public opinion shifted.
Two years ago, the high court carefully sidestepped a ruling on the constitutionality of gay marriage when it struck down a key provision of the federal Defense of Marriage Act and allowed California's Proposition 8, which banned same-sex unions, to be overturned.
In October, the justices surprised many by again avoiding the issue, declining to hear appeals of state same-sex marriage bans that had been voided as unconstitutional by several federal appeals courts.
But when the U.S. 6th Circuit Court of Appeals a month later upheld state bans of gay marriage in the four states, the high court was left with little choice but to resolve the dispute.
U.S. Atty. Gen. Eric H. Holder Jr. said the Obama administration would urge the court to "make marriage equality a reality for all Americans."
Gay rights advocates are reasonably confident they have the five-justice majority they need for victory, thanks to Justice Anthony M. Kennedy. Although he often votes with the four conservatives, he has written the court's three most important opinions in favor of gay rights.
His 2013 opinion striking down the Defense of Marriage Act provision was cited repeatedly by judges who ruled against state laws forbidding same-sex marriage. Kennedy was joined then by liberal Justices Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan.
In recent months, the high court has hinted that the majority is ready to endorse gay marriage. When state officials filed emergency pleas that sought to block rulings that called for issuing marriage licenses to gay couples, those appeals were turned down. Only Justices Antonin Scalia and Clarence Thomas dissented.
The silent assent from Chief Justice John G. Roberts Jr. and Justice Samuel A. Alito Jr. suggested that they no longer saw the prospect of a court majority upholding a state's ban on same-sex marriage.
But Michigan's lawyers are hoping they have an argument that could force Kennedy to think twice. Last year, Kennedy spoke for the court in upholding a state ballot measure that prohibited racial affirmative action in the state's colleges and universities. He said then that the voters could be trusted to decide sensitive questions of public policy.
In defending their ban on same-sex marriage, Michigan's lawyers say the state's voters opted to preserve the traditional definition of marriage, and so Justice Kennedy and the court should uphold their decision.
The cases to be heard in April feature several couples who have lived together for many years.
The Michigan case, DeBoer vs. Snyder, was brought by April DeBoer and Jayne Rowse, who are both nurses. They have been a couple for 10 years and are raising four foster children. Under Michigan law, they may not jointly adopt the children because they are not married, and they may not marry because same-sex unions are illegal under state law.
"To me, it's more than ironic that the state of Michigan turns to this couple as foster and adoptive parents to care for and love the state's must vulnerable children and then turns around and denies them the marriage the couple wants to protect their family and formalize their commitment," said Bonauto, who is working with the lawyers for the two women.
They sued in federal court, and after a nine-day trial, a federal judge struck down the state's ban on same-sex marriage.
Gov. Rick Snyder appealed. "Same-sex marriage does not qualify as a fundamental right," he argued in court papers, "because it is not deeply rooted in our nation's history."
In November, the 6th Circuit agreed in a 2-1 decision. Judge Jeffrey Sutton said the decision on whether to change the state's marriage laws should be made by the voters and elected officials, not the courts. That ruling upheld the marriage laws in the four states and trigged the high court's move on Friday.
The Kentucky case also features couples who are seeking to marry. The Ohio and Tennessee cases were brought by gays or lesbians who sought to win legal recognition of their marriages performed in other states.
In Friday's order, the court said the cases would be "consolidated" and presumably argued as if they were one, not four. The court said these questions would be decided: "Does the 14th Amendment require a state to license marriage between two people of the same sex?" and "Does the 14th Amendment require a state to recognize a marriage between two people of the same sex when their marriage was lawfully licensed and performed out-of-state?"
Some were puzzled as to why the justices voted to consider the two questions separately. It may simply reflect the fact that cases from two states posed only disputes over recognizing marriages performed in other states. However, if the court rules that there is a constitutional right to same-sex marriage, every state would certainly be obliged to recognize gay marriages performed elsewhere.
It is possible the justices wanted to preserve an option to rule narrowly, declining to recognize same-sex marriage as a fundamental right, but requiring states recognize same-sex marriages from other states.