The nine justices of the U.S. Supreme Court met behind closed doors on Monday to consider whether they should take up the hotly contested question of whether states can ban gay marriage.

The court has seven cases pending before it concerning bans in five states: Virginia, Utah, Oklahoma, Wisconsin and Indiana. If the court agrees to take one or more of the cases it has the chance to rule when, if ever, gay men and women in the 31 states that now bar them from marrying could get marriage licenses.

An announcement on whether the court will hear the same-sex marriage dispute could come later this week. But given the weight of the controversy and that the justices only in recent weeks received the petitions, an announcement could come at a later point. The court officially reconvenes next Monday for its new term, which runs until the end of June.

The justices are due to discuss the cases as they weigh hundreds of petitions that have piled up during the court's summer recess. The discussion is private. The court takes a case if four or more of the nine justices vote to hear it.

Gay marriage is legal in 19 of the 50 U.S. states. Judges in 16 other states have issued pro-gay marriage rulings, most of which have struck down bans. The bans have remained intact while litigation continues.

Supporters of gay marriage say the bans violate the U.S. Constitution's guarantee of equal treatment under the law.

State officials defending the bans counter that the Constitution does not dictate how states should define marriage and that there is no deeply rooted legal tradition that supports a right to gay marriage.

Although all seven cases raise the key question of whether states can ban gay marriage, they are all slightly different. If the court does decide to consider the issue, it could take one case or several.

The court could also decide to take no action on the cases at this stage. If the court were to decline to take them, appeals court rulings that struck down the bans would go into effect and other bans in certain states would likely fall as a result, but there would be no national ruling.

Across the country, a wave of court rulings favored arguments for gay marriage, prompted by the Supreme Court's 2013 decision in U.S. v. Windsor. In that case, the justices struck down a key part of a law called the Defense of Marriage Act that restricted the definition of marriage to heterosexual couples for the purposes of federal benefits.

If the Supreme Court agrees to hear at least one of the pending cases, oral arguments would be heard early next year and a ruling would come by the end of June. Additional lawsuits testing other state bans are also in the pipeline.

(Reporting by Lawrence Hurley; Editing by Will Dunham)