TEHRAN, Iran — Iran’s President Hassan Rouhani met with Turkish officials in Ankara Monday, with discussions on developments in Syria and bilateral ties on the agenda.

Rouhani is on a two-day trip to Turkey, with eyes on restoration of once fruitful relations in trade and security. The trip is the first official Iranian presidential visit to Turkey since 1996.

He is scheduled to meet with Turkish President Abdullah Gul and Prime Minister Recep Tayyip Erdogan.

“In recent months, we have witnessed positive developments in the region, particularly in Syria and Iraq,” Rouhani said in remarks before leaving Tehran, the ISNA news agency reported.

“It is a necessity [for Iran and Turkey] to cooperate in all aspects, as well as issues regarding North Africa, Palestine and the Middle East,” he said, without elaboration, adding that improvement of bilateral relations was of “importance” to the whole region.

Shiite Iran is the main regional ally of Syrian President Bashar Assad, but Sunni-majority Turkey has moved from trying to encourage reform in Syria to overtly supporting the armed opposition.

Rouhani on Monday congratulated Assad on his re-election for a third seven-year term last week, in a poll ridiculed by Syrian opposition groups and their Western and Arab backers.

In a congratulatory message, reported by the official IRNA news agency, Rouhani said the election was a sign of the “confidence of Syrian people” in Assad as well as a “move towards security, stability and national unity”.

During his visit, Rouhani will also discuss energy, trade and economic ties with Turkish officials, Iranian media reported.

Rouhani is expected to sign agreements with Turkey aimed at improving ties that have been strained over the war in Syria, where Iran backs the government and Turkey the rebels.

Iran is both an important trading partner for Turkey and a rival for influence in the region. Turkey, anticipating that the nuclear talks lead to a further easing of sanctions on Iran, is looking to boost energy cooperation.