The attorneys general of Washington, D.C., and Maryland filed a lawsuit in federal court Monday against President Donald Trump, alleging he violated the Constitution by allowing his businesses to accept payments from foreign governments.

Interested in Donald Trump?

Add Donald Trump as an interest to stay up to date on the latest Donald Trump news, video, and analysis from ABC News.

Karl Racine, the attorney general for Washington, D.C., and his Maryland counterpart, Brian Frosh, who are both Democrats, said their suit was born out of concern for upholding the Constitution.

"We are a nation of laws, and no one, including the president of the United States, is above the law," Racine said at a press conference.

The lawsuit, first reported by The Washington Post late Sunday, hinges on Trump's decision to maintain ownership of his company after becoming president.

White House spokesman Sean Spicer on Monday afternoon reiterated the administration's position that Trump is not in violation of the Constitution's emoluments clause, which prohibits government officials from accepting funds from foreign governments. Spicer suggested the lawsuit was motivated by politics.

"It's not hard to conclude that partisan politics may be one of the motivations behind the suit," he said in a press briefing.

Trump announced in January that he would hand his business over to his sons Donald Trump Jr. and Eric Trump and to Alan Weisselberg — a longtime Trump business executive — through a financial trust, in an effort to eliminate potential conflicts of interests.

Racine and Frosh said Monday that Trump has broken promises to separate himself from his business interests, noting that he receives regular updates on his company's finances.

"[Americans] must know we won't enter into a treaty because the president owns a golf course there," Frosh said.

Another lawsuit — filed earlier this year by government watchdog group Citizens for Responsibility and Ethics in Washington, the Restaurant Opportunities Centers United Inc. and two individuals — alleges that Trump has been in violation of the Constitution's emoluments clause since he took office.

The Justice Department sought to have that suit dismissed on Friday, arguing that none of the plaintiffs suffered an injury that would give them standing to sue, according to papers filed in Manhattan federal court.

Deepak Gupta, a lawyer for one of the plaintiffs, told The Associated Press on Friday that his clients have standing because they compete with Trump's hotels and restaurants for business from foreign governments.

"This is about whether the president is loyal to the American people and the American people alone," Gupta told the AP. "There have been many presidents before him. No president has had the kind of business entanglement with foreign governments like Donald Trump."

Gupta said a ruling on that case could come as early as the end of the summer after additional arguments from both sides.