Revelations by Libyan officials to the Associated Press have lifted the lid on more than six months of questions about how Turkey was able to push Tripoli to accept thousands of extremist Syrian mercenaries in exchange for Ankara getting energy rights - leaving Libya with little gains except being saddled with extremists.
Last November, Libya's embattled Government of the National Accord was under siege in Tripoli by the Egyptian-backed Khalifa Haftar. Haftar, with a rival government based in Benghazi, appeared to be on the verge of ousting the dysfunctional Government of National Accord (GNA).
Suddenly Ankara, which along with Qatar had backed the GNA with limited weapons and financing, swept in to offer a deal.
Turkey would get energy rights off the coast which would let it threaten Greece and potentially harm Israel's interests in an East Mediterranean pipeline, and Ankara would aid Tripoli with some drones and Syrian rebels.
At the time it seemed farcical. Why would Turkey, which backs the Syrian opposition, send Syrians to fight and die in Libya?
Wasn't sending mercenaries and weapons to Libya an illegal involvement against UN sanctions there?
But Turkey's ruling party has a long track record of ignoring international laws and invading its neighbors, bombing civilians in northern Iraq and ethnically cleansing Afrin in Syria in 2018 – so recruiting vulnerable Syrians to fight in Libya was just one more violation of international norms.
Turkey could count on support or silence from the European Union, NATO and the United Nations because it was threatening to force hundreds of thousands of Syrian refugees into Europe in the winter of 2019.
The message was clear to the European Union: Either let Turkey seize a swath of the Mediterranean and take over part of Libya and send Syrians there, or the Syrians – some of whom were extremists – will be Europe's problem. With Germany and other European countries paying Ankara billions to keep Syrians in Turkey, there wasn't much choice.
Now the Libyan side of the story can be told in more detail. We know that since Turkey has escalated the conflict in Libya, which previously was a ramshackle civil war with limited backing from a plethora of foreign powers, the Russians have sent warplanes, and Egypt has threatened to intervene.
Turkey's involvement has made Libya a much larger conflict.
In short, Turkey's involvement has made Libya a much larger conflict with stakes that now link to all of Europe and the Middle East. It has become a testing ground for Turkish drones, Russian air defense and Chinese armed drones, and has brought Egypt, the UAE, Greece and France closer together to complain about Turkey's role.
The AP reports assert that Turkey sent up to 3,800 mercenaries and some troops to support Libya's GNA, which is run by Prime Minister Fayez Sarraj.
"They took advantage of our weakness at the time," the Libyan officials now say.
Turkey "took advantage of our weakness," GNA officials now say.
This has shocked and angered the pro-Ankara media in Turkey which is all pro-government and which has been sold a populist, militarist, religious narrative by the government of Recep Tayyip Erdogan.
For the pro-government media in Turkey, the adventure in Libya was part of Ottoman-era rights, and Turkish media claims there are "Turks" in Libya that need defending.
The Muslim Brotherhood, which is linked to Hamas and Qatar which Ankara supports, also wants Turkey in Libya.
So Turkey's media called the Libyan war a "revolution" like the Arab Spring, fighting against "warlords."
But it now turns out that Ankara was pressuring Sarraj for a year for the energy and maritime deal. Turkey was the only country really ready to give support.
"Islamists inside Sarraj's administration" also supported the deal.
Turkey's current regime, which has increasingly jailed tens of thousands of dissidents and suppressed Kurdish civil rights in recent years, has been accused of working with extremists in northern Syria.
ISIS members are often found to have fled to Turkey or used it to transit to Idlib. ISIS leader Abu Baqr al-Baghdadi was found in October 2019 in Syria close to the Turkish border.
ISIS members have even trafficked Yazidi genocide victims to Turkish-occupied Idlib province in Syria. The US has carried out airstrikes against Al-Qaeda, which operates in Turkish-occupied areas of Syria.
It now appears that Turkey will milk Libya economically. The AP report says Ankara has given Tripoli a bill of $1.7 billion for money owed to Turkish companies.
A role in oil and offshore energy and then military bases will likely come next. Tripoli appears to be concerned that it is becoming another colony of Ankara, similar to the instability Turkey unleashed in northern Syria, where local voices become subservient to its whims but have little control over their own destiny.
It's unclear if Turkey's growing involvement will result in a deal with Russia now to divide Libya, the way Turkey has partitioned Syria.
Some voices in Turkey may be wondering if the Libyan adventure was worth it, especially now with the criticism. It has united most Arab countries in opposition to Turkey's role. It has also angered Greece.
News on July 29 is that Ankara has a new deal to sell Greece drones and may be trying to reduce tensions in the Mediterranean with Athens. Perhaps Libya was not all it appeared to be in the end – and Turkey is now waiting to see where the next crisis will emerge.
Seth Frantzman is a Ginsburg-Milstein Writing Fellow at the Middle East Forum and senior Middle East correspondent at The Jerusalem Post.