Iran has said it would quit Syria peace talks if it found them unconstructive, citing the "negative role" of Saudi Arabia, in the latest twist in a spat between the regional rivals that bodes ill for efforts to ease turmoil across the Middle East.

Increasingly bad-tempered exchanges between the conservative Sunni-ruled kingdom and the revolutionary Shi'ite theocracy have dampened hopes of improved ties after the adversaries sat down for their first meeting to discuss the Syria war last week.

"In the first round of talks, some countries, especially Saudi Arabia, played a negative and unconstructive role Iran will not participate if the talks are not fruitful," Foreign Minister Hossein Amir Abdollahian said.

Delivering unusually personal criticism, Iranian President Hassan Rouhani appeared to reprimand Saudi Foreign Minister Adel al-Jubeir, who, on Saturday, lashed out at Tehran for what he termed its interference in regional countries.

"An inexperienced young man in a regional country will not reach anywhere by rudeness in front of elders," Mr Rouhani said. He did not name the "young man" but Mr Jubeir was assumed to be his target.

Mr Jubeir, in his mid-50s, took up his job on the death this year of veteran predecessor Prince Saud al-Faisal at the age of 75.

World and regional powers including Iran and Saudi Arabia met in Vienna on Friday to discuss a political solution to Syria's civil war but failed, as expected, to reach a consensus on the future of President Bashar al-Assad. Iran backs Assad in the war while Saudi Arabia supports rebels seeking to oust him.

It was the first time Tehran and Riyadh were at the same table to tackle a war that has evolved into a wider proxy struggle for regional dominance between Russia and Iran on Assad's side and Turkey, US-allied Gulf Arab states and Western powers who support rebels to various degrees.

Saudi Arabia wants Assad gone, and has provided support to Syria's moderate opposition forces, while Iran has sent in fighters and material support to bolster Assad.

Less than 24 hours after the Vienna talks, Mr Jubeir used a high-profile regional security conference in the Gulf Arab kingdom of Bahrain, which Iran's government did not attend, to attack Iranian policies.

He accused Iran of attempting to smuggle weapons to Bahrain and Saudi Arabia, as well as meddling in Lebanon, Syria, Iraq and Yemen, something he said was "driving the negativity" in Iran-Saudi relationship.

"We have extended our hand in friendship to Iran," said Mr Jubeir, adding that Riyadh had made the point "time and time again" that it sought good relations with Tehran.

"It is up to the Iranians whether they want to have relations with us based on good neighbourliness ... or if they want to have relations that are filled with tension.

"That is on Iran."

Tehran reacted with ire.

Speaking to Iranian media, Mr Abdollahian warned Mr Jubeir "not to test our patience".