BEIRUT (Reuters) - Iranian Supreme Leader Ayatollah Ali Khamenei lashed out on Sunday at U.S. President Donald Trump's administration and what he characterized as its hostility to the Islamic Republic.

"This inexperienced group has not recognized the people and leaders of Iran," he said, according to the website for state TV. "When they get hit in the mouth, at that time they'll know what's going on."

Khamenei and other senior Iranian officials have ramped up their criticism of the United States in recent weeks after Trump went on an official visit last month to Saudi Arabia, Iran's main regional rival.

During that visit, Trump singled out Iran as a key source of funding and support for militant groups. He has also criticized the nuclear deal between Iran and six major powers, including the United States, that led to the lifting of most sanctions against Iran, in return for curbs on its nuclear programme. Trump has said Washington would review the deal but stopped short of pledging to scrap it.

Iran and the United States cut diplomatic ties shortly after Iran's 1979 Islamic revolution and enmity to Washington has long been a rallying point for hardline supporters of Khamenei in Iran.

Khamenei has accused the United States and its regional ally Saudi Arabia of funding hardline Sunni militants, including Islamic State, which carried out its first attack in Iran earlier this month, killing 17 people.

Riyadh has denied involvement in the suicide bombings and gun attacks on Iran's parliament and the mausoleum of the Islamic Republic's founder, Ayatollah Ruhollah Khomeini.

Khamenei said in his speech on Sunday that any efforts to destabilize the Islamic Republic would not succeed.

"In the past 38 years, when has there been a time when you haven't wanted to change the Islamic system?" Khamenei said, according to Fars News. "Your head has hit the rock each time and always will."