Beirut: Iranian Foreign Minister Mohammad Javad Zarif has criticised US President Donald Trump for sealing an arms deal and other investments worth hundreds of billions of dollars with Saudi Arabia, Tehran's arch-rival in the Middle East.

Zarif's comments came hours after Trump, who is visiting Saudi Arabia, urged Arab and Islamic leaders to unite and defeat Islamist extremists.

Trump on Sunday singled out Iran as a key sponsor of militant groups, sending a tough message to Tehran the day after Hassan Rouhani won a second term as Iran's president.

"Iran - fresh from real elections - attacked by @POTUS in that bastion of democracy & moderation. Foreign Policy or simply milking KSA of $480B?," Zarif wrote in a Twitter post, referring to the Kingdom of Saudi Arabia.