Turkey's parliament has approved a military deployment to support the Tripoli-based Government of National Accord (GNA) in Libya which has been under siege by military strongman General Khalifa Haftar since April.
No details on the timing or scale of the deployment have been set, but the move carries a number of benefits -- most notably securing an ally for its claims to the gas-rich eastern Mediterranean.
It also carries major risks for President Recep Tayyip Erdogan's government.
Can it succeed?
Analysts say Turkey initially expected to send around 200 troops, primarily as advisors, but that this may not be enough.
"The GNA seems to be insisting on something far more substantial, maybe a brigade-level deployment and including perhaps F-16s and naval elements in order to protect Tripoli from maritime attacks. We'd be looking at something in the range of 3,000 soldiers," said Ege Seckin, Turkey analyst for IHS Jane's in London.
There are doubts over Turkey's ability to project that kind of force thousands of kilometres across the Mediterranean, particularly after Tunisia appeared last month to reject its request to provide a launchpad for its troops.
"Turkey has the capacity, but given that Libya is relatively far away, there are shortcomings. First, a logistical difficulty: how do you supply the troops? Second, achieving air superiority: it is unlikely Turkey could deploy planes in Libya," said Sinan Ulgen, of the Istanbul-based Centre for Economics and Foreign Policy Studies.
Using F-16 fighter jets would require multiple mid-air refuellings to reach Libya from Turkey, said Seckin.
"The GNA bases probably don't have the infrastructure for NATO aircraft and they would be directly in harm's way," he said.
Benefits for Turkey?
Despite logistical challenges, Turkey has major interests in protecting its Libyan ally.
When the GNA signed a military cooperation deal with Turkey in November, it also bowed to Turkey's demand for a maritime boundary agreement, giving it extensive rights over the eastern Mediterranean where the recent discovery of undersea gas reserves has triggered a scramble by littoral states.
The maritime deal with Libya cuts across claims by Greece and others, and has been strongly contested. But its aim was to ensure Turkey, which was left out of the newly-established "East Mediterranean Gas Forum", could no longer be ignored.
This was not a last-minute decision, said Seckin, but part of the "Blue Homeland Doctrine" for which Turkey's Navy Chief Cihat Yayci has been advocating for the past decade.
There are other business interests for Turkey, argues Jana Jabbour, Turkey expert at Sciences Po in Paris, not least the construction projects in Libya run by Erdogan's son-in-law Selcuk Bayraktar.
There is also the simple fact that Turkey has no choice.
"The alternative to this deployment is that Ankara would lose its last remaining branch of support in the Eastern Mediterranean," said Seckin.
"Over the past decade, Ankara went from a policy of 'zero problems with neighbours' to 'nothing but problems with neighbours'. It faces a united front of Israel, Cyprus, Greece, Egypt and now potentially Libya -- it doesn't look promising."
Risks for Turkey?
Haftar is supported by Turkey's fiercest regional rivals -- Egypt, Saudi Arabia and the United Arab Emirates -- and some fear that announcing a deployment may backfire, hastening their push to seize Tripoli.
"Before Ankara can establish a more formidable military presence, Cairo has incentive to provide Haftar with sufficient heavy armored vehicles and other support to conquer Tripoli," wrote Micha'el Tanchum, a non-resident fellow at the Centre for Strategic Studies at Baskent University in Ankara.
The deployment also risks clashes with Russia, which has reportedly sent mercenaries to support Haftar (though this is denied by Moscow).
Russia is said to have deployed Pantsir S1 short-to-medium-range air defences -- very effective against drones, which are Turkey's main battlefield weapon in Libya at present.
That could undermine the close ties between Erdogan and Russian President Vladimir Putin that have led to increased defence ties and dialogue over energy-sharing and the Syrian conflict.
"Up to now, the Turks and Russians have shown they can avoid direct conflict despite occasional crises," said Jabbour. "(But) sending Turkish troops to Libya risks renewed tensions."