The 7-2 ruling rejected arguments that allowing subsequent prosecutions violates the double jeopardy clause in the Bill of Rights, which prohibits more than one prosecution or punishment for the same offense.
Justice Samuel Alito Jr. wrote for the majority; Justices Ruth Bader Ginsburg and Neil Gorsuch dissented.
Since the 1850s, the court has allowed an exception to the Constitution's double-jeopardy prohibition on the theory that the federal and state governments are separate constitutional actors with their own sovereign authority.
Alito said that the evidence mounted by challengers that the practice departs from the founding-era understanding of the Double Jeopardy Clause is "feeble; pointing the other way are the Clause's text, other historical evidence, and 170 years of precedent."
The case drew special attention because of Trump's musings that he might pardon some officials caught up in investigations of the administration. For instance, some states have said they plan to prosecute former Trump campaign chairman Paul Manafort under their own tax evasion laws should Trump pardon Manafort on his federal convictions.
But Monday's case, Gamble v. U.S., started long before the current president took office. It represented a concerted effort by groups of conservatives and liberals alike to persuade the court that the exception exposes defendants to the potential harassment, trauma, expense and sometimes extra punishment the double jeopardy clause was designed to prevent.
The case was brought by Terance Gamble, who was convicted of robbery in Mobile County, Alabama, in 2008 and two domestic violence charges in 2013. Under both state and federal law, such a convicted felon may not possess a firearm.
But police found one in Gamble's car when he was stopped in 2015. Gamble pleaded guilty to the state charges and was sentenced to a year in prison. Federal prosecutors also brought charges, and he received a lengthier sentence with that conviction.
He said that violated the double jeopardy clause of the Constitution's Fifth Amendment, which prohibits more than one prosecution or punishment for the same offense.
But the Supreme Court has long permitted successive prosecutions and punishments if one is brought by state prosecutors and the other by the federal government.
In more modern times, it has been a handy tool for enforcing civil rights. For instance, federal prosecutors brought charges against the Los Angeles police officers who beat motorist Rodney King in California after state trials ended in acquittals.
The motivation for the court to accept the current case came from an unlikely duo on the court: Ginsburg and Justice Clarence Thomas.
Alito reached deep in his analysis, as he put it in one passage: "from the very dawn of the common law in medieval England until the adoption of the Fifth Amendment in 1791." But he said there were many reasons to believe that the Double Jeopardy Clause does not bar all subsequent prosecutions.
"If, as Gamble suggests, only one sovereign may prosecute for a single act, no American court-state or federal-could prosecute conduct already tried in a foreign court," Alito wrote, noting that such prosecutions are specifically allowed.
Thomas joined Alito's opinion, and wrote separately to say that after studying the issue more, "the historical record does not bear out my initial skepticism of the dual-sovereignty doctrine."
Ginsburg, who at oral argument called federal and state prosecutions a "double whammy," was steadfast in her concerns.
Reaffirming the precedent diminishes "the individual rights shielded by the Double Jeopardy Clause," she wrote. "Different parts of the 'WHOLE' United States should not be positioned to prosecute a defendant a second time for the same offense." The capitalization reflected a passage in the Federalist Papers.
Justice Neil Gorsuch, who joined the court in 2017, also dissented.
"When governments may unleash all their might in multiple prosecutions against an individual, exhausting themselves only when those who hold the reins of power are content with the result, it is the poor and the weak, and the unpopular and controversial, who suffer first-and there is nothing to stop them from being the last," Gorsuch wrote.
"The separate sovereigns exception was wrong when it was invented, and it remains wrong today."
The federal government and the states argued that they have their own interests in upholding their laws, and that they do not abuse the right. Gamble's case was a rarity, they said.
"Each state has a strong interest in its sovereign power to prosecute violations of its laws regardless of the prosecutorial decisions of other sovereigns, whether the federal government or other states," said a brief filed by Texas and 35 other states.
At the same time, more than 20 states have their own restrictions on prosecuting crimes for which an individual has already been prosecuted, as does the Department of Justice.
Sign up for the daily JWR update. It's free. Just click here.