Same-sex marriage advocates gather in Salt Lake City on July 9. An appeals court in Denver recently struck down Utah’s ban on same-sex marriage prompting the state to ask the Supreme Court to rule on the issue. (Rick Bowmer/AP)

Utah asked the Supreme Court on Tuesday to decide whether same-sex couples have a constitutional right to marriage or whether it is up to states to allow or prohibit such unions.

Virginia, which said it did not want to be left behind, indicated it would file a similar request later this week.

An appeals court in Denver struck down Utah’s ban, while the U.S. Court of Appeals for the 4th Circuit, based in Richmond, ruled in the Virginia case, saying that marriage is a fundamental right that may not be withheld from gay couples.

Those rulings are part of an unbroken string of cases in which federal courts have said that state bans cannot stand in the wake of a 2013 Supreme Court ruling. In United States v. Windsor, the court struck down a federal definition of marriage as between a man and a woman but did not say whether states could forbid same-sex marriages.

Utah is vigorously defending its law, as are most of the 31 states that do not allow gay marriage.

Same-sex marriage status in the U.S., state-by-state

“It comes down to this: thousands of couples are unconstitutionally being denied the right to marry, or millions of voters are being disenfranchised of their vote to define marriage,” Utah officials said in their petition. “Either way, the court’s review is necessary, and this case is the right vehicle to do so.”

Virginia is in a different posture. The commonwealth’s Democratic leaders support same-sex marriage and have argued that the state constitutional ban should be overturned.

But Attorney General Mark R. Herring does not want marriages to occur in Virginia until the Supreme Court provides finality on the issue.

“I believe the district and appeals courts ruled correctly in striking down Virginia’s discriminatory marriage ban, but it has long been clear that the Supreme Court will likely have the final word,” Herring said in a statement. “I want that decision to come as soon as possible and I want the voices of Virginians to be heard.”

Herring asked the 4th Circuit to stay its ruling until the Supreme Court acts.

Both Utah and Virginia have raced to get their petitions to the high court. But the justices are under no obligation to take either case and face no deadline for making a decision. They might want to wait until other appeals courts have reviewed the issue.

The U.S. Court of Appeals for the 6th Circuit in Cincinnati will be hearing cases from four states on Wednesday, and two other courts will hold hearings within the next six weeks.

Niraj Chokshi contributed to this report.