President of Iran Hassan Rouhani addresses during the cabinet meeting in Tehran, Iran on December 31, 2017.

Iran's president poured scorn on Wednesday on U.S. and European discussions over Tehran's nuclear agreement, and dismissed Donald Trump as a "tradesman" who lacked the qualifications to deal with a complex international pact.

Hassan Rouhani spoke after French President Emmanuel Macron flew to Washington to try to persuade Trump not to scrap the 2015 agreement — under which Iran curbed its nuclear program in return for the lifting of sanctions.

"They say that with the certain leader of a European country we want to make a decision about a seven-sided agreement," Rouhani said in a speech broadcast live on state TV.

"For what? With what right?" he added.

He reserved particular scorn for the U.S. president, who has called the agreement one of the worst deals ever negotiated and has threatened to restore U.S. sanctions next month unless what he sees as severe flaws are fixed.

"You don't have any background in politics. You don't have any background in law. You don't have any background on international treaties," Rouhani said.

"How can a tradesman, a merchant, a building constructor, a tower constructor make judgments about international affairs," he added referring to Trump's career as a property developer.

The other powers that signed the agreement with Iran — Russia, China, Germany, Britain and France — have all said they want to preserve it. Many in the West see it as the best hope of preventing Iran from getting a nuclear bomb and heading off a nuclear arms race in the Middle East.

In a bid to salvage the deal while satisfying Trump's call for tougher action, Macron's has proposed that the United States and Europe block any Iranian nuclear activity until 2025 and beyond, address Iran's ballistic missile program and generate conditions for a political solution to contain Iran in Yemen, Syria, Iraq and Lebanon.

German Chancellor Angela Merkel will hold talks with Trump in Washington later in the week.

Senior Iranian officials have said repeatedly that Iran's ballistic missile program is not up for negotiation.