U.S. President Donald Trump called on Thursday for former U.S. Secretary of State John Kerry to be prosecuted for having talks with Iranian officials, including Foreign Minister Javad Zarif, since leaving office in an attempt to save the 2015 Iran nuclear deal.

“You know 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 told reporters at the White House.

The 18th-century law prohibits unauthorized U.S. citizens from corresponding with foreign governments having a dispute with the United States. No one has ever been convicted under it.

“But my people don’t want to do anything; only the Democrats do that kind of stuff. If it were the opposite way, they’d prosecute him under the Logan Act,” said Trump.

The president apparently was referring to Kerry conducting shadow diplomacy to salvage the nuclear deal, which the United States withdrew from last year and reimposed sanctions that were lifted under it, in addition to enacting new penalties against Tehran.

Kerry admitted in September to meeting with Zarif “three or four times” regarding the nuclear agreement.

“What I have done is tried to elicit from him what Iran might be willing to do in order to change the dynamic in the Middle East for the better,” said Kerry on Hugh Hewitt’s radio show.

A spokesperson for Kerry said, “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. Secretary Kerry helped negotiate a nuclear agreement that worked to solve an intractable problem. The world supported it then and supports it still. We’d hope the president would focus on solving foreign-policy problems for America, instead of attacking his predecessors for theater.”

This week, the Trump administration announced sanctions that will target Iran’s aluminum, iron, copper and steel sectors.