WASHINGTON — Setting the stage for a potentially historic ruling, the Supreme Court announced Friday it will decide whether same-sex couples have a right to marry everywhere in America under the Constitution.

The justices will take up gay-rights cases that ask them to declare for the entire nation that people can marry the partners of their choice, regardless of gender. The cases will be argued in April, and a decision is expected by late June.

Proponents of same-sex marriage said they expect the court to settle the matter once and for all with a decision that invalidates state provisions that define marriage as between a man and a woman. On the other side, advocates for traditional marriage want the court to let the political process play out, rather than have judges order states to allow same-sex couples to marry.

Same-sex couples can marry in 36 states and the District of Columbia.

That number is nearly double what it was just three months ago, when the justices initially declined to hear gay marriage appeals from five states seeking to preserve their bans on same-sex marriage. The effect of the court’s action in October was to make final several pro-gay rights rulings in the lower courts.

Now there are just 14 states in which same-sex couples cannot wed. The court’s decision to get involved is another marker of the rapid change that has redefined societal norms in the space of a generation.

The court will be weighing in on major gay rights issues for the fourth time in in 27 years. In the first of those, in 1986, the court upheld Georgia’s anti-sodomy law in a devastating defeat for gay rights advocates.

But the three subsequent rulings, all written by Justice Anthony Kennedy, were major victories for gay men and lesbians. In its most recent case in 2013, the court struck down part of a federal anti-gay marriage law in a decision that has paved the way for a wave of lower court rulings across the country in favor of same-sex marriage rights.

The court is extending the time it usually allots for argument from an hour to two-and-a-half hours. The justices will consider two related questions. The first is whether the Constitution requires states to issue marriage licenses to same-sex couples. The other is whether states must recognize same-sex marriages performed elsewhere.

The appeals before the court come from gay and lesbian plaintiffs in Kentucky, Michigan, Ohio and Tennessee. The federal appeals court that oversees those four states upheld their same-sex marriage bans in November, reversing pro-gay rights rulings of federal judges in all four states. It was the first, and so far only, appellate court to rule against same-sex marriage since the high court’s 2013 decision.

Ten other states also prohibit such unions. In Arkansas, Mississippi, Missouri, South Dakota and Texas, judges have struck down anti-gay marriage laws, but they remain in effect pending appeals. In Missouri, same-sex couples can marry in St. Louis and Kansas City only.

Louisiana is the only other state that has seen its gay marriage ban upheld by a federal judge. There have been no rulings on lawsuits in Alabama, Georgia, Nebraska and North Dakota.