Turkey and Iran agree on the need for a political solution to end Yemen's war, which has raised tensions between them, Iran's president has said after talks with his visiting Turkish counterpart.

"We talked about Iraq, Syria, Palestine ... We had a long discussion about Yemen. We both think war and bloodshed must stop in this area immediately and a complete ceasefire must be established and the strikes must stop" in Yemen, Iran's President Hassan Rouhani said during a joint news conference broadcast by state television.

Turkey's President Recep Tayyip Erdogan made no remarks about Yemen, where Houthi rebels and their allies - widely believed to be supported by Tehran - are battling forces loyal to embattled President Abd-Rabbu Mansour Hadi, while a Saudi-led coalition is bombing the rebels' positions.

Erdogan, however, talked at length about bilateral relations with Iran, which has condemned the strikes. Turkey supports the aerial bombardment, which began on March 26.

Rouhani said he hoped the two countries, "with the help of other countries in the region" would contribute to "peace, stability, a broader government and dialogue" between Yemenis.

"We agree on the fact that instability, insecurity and war must cease throughout the region," he said.

Erdogan denounced at the end of March what he called Iran's will for "domination" in Yemen, calling on Tehran to "withdraw all its forces from Yemen, Syria and Iraq".

Mohammad Javad Zarif, the Iranian foreign minister, reacted by accusing Turkey of causing instability in the Middle East.

Erdogan, a former close ally of Syrian President Bashar al-Assad, supported the uprising in Syria and backed rebels fighting Assad's government. Iran supports the Syrian government.

Several ministers accompanied Erdogan, who also met Iran's supreme leader, Ayatollah Ali Khamenei, during his one-day visit.

'Expensive gas'

Despite the tensions, the neighbouring countries want to strengthen trade to $30bn in 2015.

Erdogan pointed out that the balance of trade was unfavourable to Turkey, since "Iran exports $10bn and imports only $4bn in Turkish products".

"The gas we buy from Iran is the most expensive. If the price drops we can buy more," Erdogan said. "That's what a friendly country is."

During the visit, eight documents - particularly in the areas of transport, customs, industry and health - were signed.

Al Jazeera's Bernard Smith, reporting from Istanbul, said that Erdogan focused on trade relations during his visit and asked Iran to bring the natural gas price for Turkey down.

Smith said: "Before Erdogan arrived in Tehran, he had a meeting with the Saudi interior minister. Turkey has suggested it might offer logistical support to Saudis in their campaign in Yemen. But in Tehran, he made no concrete reference to the conflict in Yemen publicly."

Source: Al Jazeera and agencies