President Trump said Thursday that former Secretary of State John Kerry John Forbes KerryThe Memo: Warning signs flash for Trump on debates Divided country, divided church TV ads favored Biden 2-1 in past month MORE should be prosecuted under the Logan Act for speaking with Iranian officials and criticizing Trump's policies in Iran.

Trump told reporters at the White House that he would not rule out the possibility of military action in Iran amid escalating tensions before laying into Kerry for his involvement.

ADVERTISEMENT

"What I’d like to see with Iran, I’d like to see them call me," Trump said. "John Kerry speaks to them a lot, and John Kerry tells them not to call. That’s a violation of the Logan Act, and frankly he should be prosecuted on that."

Trump added that his "people don't want to do anything," and that "only the Democrats do that kind of stuff."

The Logan Act bans private citizens from negotiating with foreign governments without permission from the U.S. Violating the obscure law is a felony, but only two people have ever been charged with doing so and nobody has ever been convicted.

"Everything President Trump Donald John TrumpSteele Dossier sub-source was subject of FBI counterintelligence probe Pelosi slams Trump executive order on pre-existing conditions: It 'isn't worth the paper it's signed on' Trump 'no longer angry' at Romney because of Supreme Court stance MORE said today is simply wrong, end of story," a spokesman for Kerry told CNN. "He's wrong about the facts, wrong about the law, and sadly he's been wrong about how to use diplomacy to keep America safe."

Kerry, who served as secretary of State under former President Obama, helped negotiate the Iran nuclear deal, which offered sanctions relief in exchange for Tehran curbing its nuclear program.

Trump pulled the U.S. out of the deal a year ago despite objections from allies that remained in it. The administration has steadily reimposed sanctions on Iran in the time since.

Kerry has been a fierce critic of Trump's presidency and his policy on Iran in particular.

Kerry said last year that he has met with the Iranian foreign minister "three or four" times since leaving office for discussions on the nuclear deal and other issues. The remarks drew rebukes from Trump and other members of his administration.

Tensions between the U.S. and Iran have ratcheted up in recent weeks amid a flurry of measures from the Trump administration.

Last month, the Trump administration labeled Iran’s Revolutionary Guard a “foreign terrorist organization." Trump on Wednesday announced fresh sanctions on the Iranian metals sector in an effort to cut off a source of government revenue.

On Sunday, national security adviser John Bolton John BoltonJudge appears skeptical of Bolton's defense of publishing book without White House approval Maximum pressure is keeping US troops in Iraq and Syria Woodward book trails Bolton, Mary Trump in first-week sales MORE announced the deployment of a U.S. carrier strike group and a bomber task force to the Middle East. Officials have cited a "credible threat" from Iran, but have not elaborated on the cause.

Trump was asked about the carrier decision on Thursday and offered few specifics other than to say Iran had been "very threatening."

"We have information that you don’t want to know about. They were very threatening, and we just want to have — we have to have great security for this country," Trump said.

Asked about the risk of a military confrontation there, Trump said that's always a possibility.

"I don’t want to say no, but hopefully that won’t happen," he said.

—Updated at 2:41 p.m.