AP
Speaking as fledgling Syrian peace talks entered a second day on the other side of Switzerland, Rouhani told the World Economic Forum that the Syrian people should be allowed to decide their own destiny.
"The best solution is to organize free and fair elections inside Syria," Rouhani told the World Economic Forum in Davos.
"No outside party or power should decide for the Syrian people and Syria as a country."
Describing a conflict that has been raging for nearly three years as a "major catastrophe", Rouhani said Iran was deeply concerned by the influx of foreign fighters he described as "terrorists" into Syria.
"Millions of innocent people have been killed, maimed or made homeless - it is a miserable situation and very sad," Rouhani said.
"All of us should work together to push terrorists out of Syria and advise the countries who support them that this is not their own best interests - their next stop will be their own countries."
UN efforts to involve Iran in the Syria peace talks foundered as a result of objections from the United States and the opposition, who accuse Tehran of having propped up the regime of President Bashar al-Assad.