ANKARA - Turkey's parliament passed a bill on Thursday approving a military deployment to Libya, aimed at shoring up the UN-backed government in Tripoli.
The motion passed by 325 votes to 184, and follows a request for assistance by the beleaguered Tripoli government, which has been under sustained attack since April by military strongman General Khalifa Haftar, who is backed by Turkey's regional rivals - Saudi Arabia, Egypt and the United Arab Emirates. There are also reports that hundreds of mercenaries from Russia are on the ground to support Haftar's Libyan National Army (LNA).
The conflict in Libya is playing out against a larger political backdrop. Turkey is open in its support for the Muslim Brotherhood, the Islamist movement that has been declared a terrorist group by Ankara's Arab rivals.
Turkey's fierce rivalry with the military government in Egypt is seen as a significant motivating factor behind the planned deployment. Turkish President Recep Tayyip Erdogan's strong backing of the Muslim Brotherhood - throughout the Middle East - has raised the ire of Cairo. The Egyptian branch of the Muslim Brotherhood was violently overthrown by Egyptian President Abdel Fattah al-Sisi in 2013, when the former military chief ousted Egypt's first democratically elected president Mohammed Morsi.
The Tripoli-based Government of National Accord (GNA) in Libya, headed by Prime Minister Fayez al-Sarraj, is affiliated with the Brotherhood and counts numerous Islamist groups among the militias fighting on its behalf in Tripoli.
Erdogan's office confirmed last Friday that a request for military support had been received from the GNA. No details have been given on the scale of the potential deployment, and Vice-President Fuat Oktay told state news agency Anadolu on Wednesday that no date had yet been set.
"We are ready. Our armed forces and our defence ministry are ready," he said, adding that parliamentary approval would be valid for a year. He described the parliament motion as a "political signal" aimed at deterring Haftar's army.
"After it passes, if the other side changes its attitude and says, 'OK, we are withdrawing, we are abandoning our offensive,' then what should we go there for?"
A UN report in November said several countries were violating the arms embargo on Libya in place since the overthrow of its long-time dictator Moamer Kadhafi in 2011. Jordan and the UAE regularly supply Haftar's forces, it said, while Turkey supports the GNA. It said Turkish and Emirati drones were spotted in Libyan skies during clashes over the summer.
Haftar has previously ordered his forces to target Turkish companies and arrest Turkish nationals. Six Turkish sailors were briefly held by his forces over the summer.
The Libyan conflict is expected to be a key topic of discussion when Russian President Vladimir Putin visits Turkey next Wednesday. Erdogan has repeatedly accused Russia of sending private mercenaries to support Haftar's forces, though this has been denied by Moscow.
There have also been reports suggesting that Ankara intends to transfer Turkish troops, as well as ethnic Turkmen fighting on its behalf in Syria, to Libya in support of the GNA.
Turkey and Russia have managed to work closely on Syria despite supporting opposing sides in that conflict. Analysts say the two powers may come to an agreement over Libya similar to the balancing act reached in Syria, in order to guarantee their mutual interests in the country's future.
Turkey has multiple economic interests in Libya, most significantly in the construction and arms trade sectors. Ankara is likely hoping to gain important contracts once the war ends and the reconstruction of Libya begins.
"We're supporting the internationally recognised legitimate government in Libya. Outside powers must stop supporting illegitimate groups against the Libyan government," Erdogan's communications director Fahrettin Altun tweeted last week.
Turkey has used its alliance with the Tripoli government to advance other interests. It signed the military cooperation agreement with the GNA during a visit by Sarraj to Istanbul in November. But they also signed a maritime jurisdiction agreement expanding Turkey's claim to large swathes of the Mediterranean where gas reserves have recently been discovered.
Turkey sees the maritime deal as ensuring a political and economic stake in the Mediterranean region at a time when the newly discovered energy reserves are suggesting potential shifts in the balance of power among Eastern Mediterranean states.
The agreement drew international criticism, particularly from Greece which says the agreement ignores its own claims to the area. It says the delineation of economic boundaries laid out in the deal fails to take into account the Exclusive Economic Zone (EEZ) of the Greek island of Crete, which runs between Turkey and the Turkish-occupied island of Cyprus.
The area delineated in the deal also covers the planned route of a pipeline - called the "EastMed Pipeline" - intended to carry gas from the Eastern Mediterranean to Europe, a shared project between Greece, Cyprus and Israel. The 2,000-kilometre pipeline will be able to transfer between nine and 12 billion cubic metres a year from offshore gas reserves between Israel and Cyprus to Greece, and then on to Italy and southeastern Europe.
Israeli Prime Minister Benjamin Netanyahu said ahead of the agreement's signing that the project "is of enormous importance to the state of Israel's energy future and its development into an energy power."
Greek energy minister Kostis Hatzidakis called it "a project of peace and cooperation" despite "Turkish threats", while the Greek economic daily Kathimerini said Athens and Nicosia had been in a hurry to finalise EastMed "to counter any attempt by the Turkish neighbour to stop the project".
Analysts say Ankara's recent moves are a response to being frozen out of such regional energy deals, most notably the "East Mediterranean Gas Forum", formed this year by Cyprus, Greece, Egypt, Israel, Jordan, Italy and the Palestinian territories. Turkey has interpreted its exclusion from that partnership as a threat to its regional influence and sees its relationship with Tripoli as an option to counteract that regional bloc.
In Cyprus, the northern third of which was invaded and occupied by Turkey in response to a Greek-inspired coup in 1974, tensions have steadily risen over the presence of Turkish drill ships in what the internationally-recognised Greek administration says is an intrusion on its own EEZ. The EU has threatened to introduce sanctions on Turkey for what it says are violations of an EU member state's sovereign waters.
Turkey's moves in the Eastern Mediterranean also come at a time of division within NATO, not least over Ankara's purchase of the S-400 missile defence system from Russia which has raised the ire of the United States - although US President Donald Trump has held off on imposing threatened sanctions.
Turkey's most recent dispute with fellow NATO member Greece is merely the latest in a series of tensions that prompted French President Emmanuel Macron - whose country also supports Haftar in Libya - to slam the alliance as "brain dead".