WASHINGTON — The Supreme Court is upholding a constitutional rule that allows state and federal governments to prosecute someone for the same crime.

The court's 7-2 decision Monday preserves a long-standing rule that provides an exception to the Constitution's ban on trying someone twice for the same offense.

The court ruled against federal prison inmate Terance Gamble. He was prosecuted by Alabama and the federal government for having a gun after an earlier conviction for robbery.

RELATED: High court sends back Oregon same-sex wedding case

The case had been closely watched because a ruling for Gamble might have made it harder for states to pursue criminal charges against defendants in the Russia investigation in the event they are pardoned by President Donald Trump.

New York authorities already have indicted Paul Manafort, Trump's former campaign chairman.