Late last year, as fighters with the Islamic State in Iraq and the Levant battled to expand their stronghold on Libya's coast, militants came within 45 miles of the country's sole remaining chemical-weapons site, unnerving Libyan and American officials who feared that potentially deadly chemicals could fall into extremist hands.
In May, when the fighters struck a mile from the lightly guarded desert facility, killing two security officersat a checkpoint, they decided it was time to act.
ISIL's encroachment on an installation outside the remote oasis town of Waddan, where 500 metric tons of chemical-weapon precursor materials were stored, set off a hurried chain of events culminating in a disarmament operation involving the United States, European countries and the United Nations.
The international effort, which concluded last week when a Danish ship unloaded the materials at a German port for destruction, is one of the rare successes that Western nations can claim in Libya since dictator Moammar Gadhafi's ouster in 2011 pitched the North African country into lawlessness and civil war.
The mission was also a sign of the risks posed by vulnerable chemicals, even if they have not been weaponized, in former dictatorships and failed states throughout the Middle East.
"We were worried about this very dangerous material," said Mohamed Taher Siyala, foreign minister of Libya's unity government. If ISIL were to capture the chemicals, he said, "it would be dangerous not [just] for us but for the international community."
The rush by the United States and its European allies to help Libya remove chemicals stored at the Ruwagha site, which had been Gadhafi's chemical-weapons farm, was also an indication of President Obama's administration's uneasiness about whether the shaky unity government would be able to secure materials that could be made into mustard gas.
"We placed a high degree of interest in moving these chemicals out of the country," said a senior U.S. official, who like other officials spoke on the condition of anonymity to discuss the operation. "We had been focused on it since we learned it was there."