Turkish President Tayyip Erdogan met his Tunisian counterpart during an unannounced visit to the North African country on Wednesday. The visit came as Ankara seeks to expand its influence across the Mediterranean and boost its position against US and European opposition to its role in North Africa. Turkey is in the process of implementing a maritime and security deal with the Libyan government in Tripoli that could see Ankara deploy troops. Conservative Kais Saied was elected Tunisia's president in October and Habib Jamil from the religiously moderate Ennahda Party was nominated as prime minister last month. Their rise to power are seen in Ankara as boosting its chances of forging close ties with allies of similar ideological persuasion now in Tunisia. Ankara is a major backer and an arms supplier to the government in neighbouring Libya, which is allied with the Muslim Brotherhood and is fighting a civil war against forces of Field Marshal Khalifa Haftar's Libyan National Army, based in Benghazi. Turkey has stepped up its support in recent weeks, nearly eight months after an offensive by the LNA to capture the capital in a bid to what it says is end the rule of militias. At a news conference in Tunis, Mr Erdogan said he discussed a cessation of hostilities in Libya with Mr Saied. Mr Erdogan said Tunisia could contribute to the stability in Libya, adding that reaching a ceasefire was paramount. Mr Erdogan’s visit is the first by a head of state since the Tunisian presidential elections. It comes after the US criticised as provocative a maritime and security deal between Turkey and the Tripoli government. The Turkish foreign and defence ministers, as well as the country’s intelligence chief accompanied Mr Erdogan to Tunis. On Tuesday, Mr Erdogan’s office said Turkey could send troops into Libya, a move that would raise the stakes with Russia. The two countries have been cooperating in Syria despite backing different sides in the civil war in the country. The deal between Ankara and Tripoli angered Greece, which has been in dispute with Ankara over maritime energy resources off Cyprus. The agreement signed last month expands Turkey's claims over a large gas-rich area of the Mediterranean and has been denounced by Greece, Egypt and Cyprus. Greek Foreign Minister Nikos Dendias met Mr Haftar in Benghazi this week, drawing condemnation from the Libyan government. He said Field Marshal Haftar agreed with Greece on the "absolute nullity of these memoranda and how harmful they are" to Libya and regional stability. After the talks in Libya, Mr Dendias flew to Cairo where he met his Egyptian counterpart Sameh Shoukry for discussions aimed at unifying opposition to the maritime deal. From Cairo, Mr Dendias set off for Cyprus, where he met with Foreign Minister Nikos Christodoulides. Mr Dendias said: "The condemnation of the Turkish actions is unanimous by all our allies and partners and this is our most powerful diplomatic weapon." Greece has urged the United Nations to condemn Ankara’s move as "disruptive" to regional peace and stability. He undertook a whistle-stop tour of Libya, Egypt and Cyprus in a bid to find allies against what Athens regards as Turkish provocation. Cyprus said that France will be included at the next foreign ministers' meeting of the island, Greece and Egypt to discuss the matter.