"God forbid, if there was a void, or disintegration, in Syria, this crisis would spill over into all countries in the region," said Salehi, whose country is a close ally of Syrian President Bashar al-Assad.
Instead, the Assad regime and its opponents should seek a political solution by setting up a transitional government until elections, he told reporters in Jeddah.
He also rejected foreign intervention in Syria, which is in its third year of conflict after protests against the regime in 2011 morphed into an armed rebellion.
Salehi on Sunday held talks with his Saudi counterpart, Prince Saud al-Faisal. He acknowledged he had "different views" with his host, whose kingdom supports the Syrian opposition.
The Syria conflict has claimed more than 80,000 lives, according to the Syrian Observatory for Human Rights, a Britain-based watchdog.