Iranian Supreme Leader Ayatollah Ali Khamenei has said that he was grateful to US President Donald Trump for revealing "the real face of America".

"We are thankful to this gentleman ... he showed the real face of America," Khamenei said in a speech to military officers in Tehran on Tuesday.

"[It was] what we have said for more than 30 years - that there is political, economic, moral and social corruption in the ruling system of the US. This gentleman came and brought it out into the open in the election and after the election."

He referred to the case of a young Iranian boy who was pictured in handcuffs at a US airport following Trump's ban on visas from Iran, among other countries.

"By what he does - handcuffing a five-year-old child - he shows the true meaning of American human rights," Khamenei said.

Iran is one of the seven predominantly Muslim countries that the Trump administration tried to ban from entering the US. The related executive order last week was frozen by the US judiciary and an appeals court is to hear Trump's latest arguments to reinstate the ban.

Khamenei also responded to Trump's tweet of February 3, when the US president said: "Iran is playing with fire - they don't appreciate how 'kind' President Obama was to them."

He ridiculed the idea of being grateful to former President Barack Obama, saying he was the one who placed "paralysing sanctions" on Iran and helped create the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group through his destabilising actions in Iraq and Syria.

READ MORE: Donald Trump clashes with courts over immigration ban

"This is the first time the supreme leader, the highest authority in the republic, has directly responded to Donald Trump's comments and threats towards Iran [with] very strong words," Al Jazeera's Dorsa Jabbari, reporting from Tehran, said.

Iranian President Hassan Rouhani earlier criticised Trump's statements regarding his country's nuclear deal with Washington and other major powers.

He called the nuclear agreement "a win-win agreement", in response to Trump, who said it was "the worst deal in history".

"The nuclear talks should be used as an example for other talks for stability and security in the region," he said.

World powers and Iran reached a landmark deal in July 2015 to curb the country's nuclear programme in exchange for sanctions relief.

Foreign Minister Mohammad Javad Zarif said that with Trump in the White House, Tehran faced "difficult days ahead" on the nuclear deal.

"I believe Trump may try to renegotiate" the deal, but "clearly, neither Iran, nor the Europeans or the international community will accept new negotiations," Zarif told Ettelaat newspaper in an interview published on Tuesday.

Source: Al Jazeera and news agencies