Speaking before a group of what was described by his office as "hundreds of young elites and outstanding scientific talents,
" Khamenei said that the European opposition to Trump's decision was "good, but not enough."
"The Europeans must stand up against the US measures ... including the sanctions they anticipate to emerge from Congress," he said.
Iran's Revolutionary Guards Corps (IRGC), one of the targets in the US President's major speech on Iran last week, also issued a statement calling Trump a "dimwit and rogue president."
In his speech, Trump announced new "tough sanctions" on the elite branch of Iran's armed forces, calling it the supreme leader's "corrupt personal terror force and militia."
"(The IRGC) has hijacked large portions of Iran's economy and seized massive religious endowments to fund war and terror abroad," Trump said.
Last week President Trump said Iran was violating the nuclear accord and he has threatened to withdraw the US from the deal
, which also involves Russia, China and the EU. So far, the other participants have said the agreement stands.
Of Iran's commitment to upholding the nuclear deal itself, Khamenei said that "so long as the other side has not torn up the JCPOA, we will not tear it up either," he said, referring to the accord, whose formal name is the Joint Comprehensive Plan of Action.
"However, if they tear up the JCPOA, we will shred it."
'Pretends to be an idiot'
Khamenei told his audience that he didn't want to spend his time commenting on Trump, Iran's Press TV reported, saying "it would be a waste of time to respond to such blatherings and nonsensical remarks by the foul-mouthed US President.
"The US President pretends to be an idiot, but this should not cause us to let our guard down," Khamenei said.
"They want to take back young, faithful and developed Iran to 50 years ago, and of course this is not possible, but due to backwardness, they are incapable of understanding this reality, and for this reason they have made a miscalculation and suffered, and will suffer successive defeats at the hands of the Iranian nation," he said.
Sticking point over ballistic missiles
On Wednesday at the United Nations in New York, US Ambassador Nikki Haley warned the UN Security Council that it was being "played"
by Iran, claiming that the international organization was allowing the theocratic regime to "get away" with a long list of violations and resolutions.
"Iran hides behind its assertion of technical compliance with the nuclear deal while it brazenly violates the other limits on its behavior," she said, adding that "this must stop."
In a Security Council session that was meant to focus on the Israeli-Palestinian conflict, Haley criticized the absence of a ban on ballistic weapon development in the nuclear accord, and said when a "rogue regime starts down the path of ballistic missiles, it tells us we will soon have another North Korea on our hands."
The administration wants to include new sanctions in US law that would snap into place should Iran continue to launch ballistic missiles or refuse to extend restrictions on its uranium enrichment when the deal expires in eight years.
European powers have said they are open to negotiating separate deals with Iran but do not favor anything that would endanger the original agreement. Iran has warned against any action that could be seen as renegotiating the 2015 deal retroactively.