Both Iran and Qatar voiced support for Saudi Arabia Saturday over a suicide bombing near Islam's holiest site in Mecca despite their severed ties.
"Iran... as always expresses its readiness to assist and cooperate with other countries to confront these criminals, who deal death and ignorantly spread hate," foreign ministry spokesman Bahram Ghassemi said.
The Qatari foreign ministry expressed "solidarity with the brotherly Kingdom of Saudi Arabia".
Six foreign pilgrims were wounded when a suicide bomber blew himself up near the Grand Mosque in Mecca, where hundreds of thousands of worshippers had gathered for prayers on the last Friday of the Muslim fasting month of Ramadan.
The Saudi interior ministry said a wider plot had been foiled with the arrest of five suspects earlier in the day.
Since late 2014, the kingdom has faced periodic bombings and shootings claimed by the Daesh terror group.
Iran and Saudi Arabia are locked in a bitter battle for regional influence and have had no diplomatic relations since January last year.
Saudi Arabia severed all ties with Qatar earlier this month accusing it of supporting "terrorist groups" in the region, a charge Doha denies.