Syria, defeated by Israel in three wars and afraid its arch enemy had gained a nuclear arsenal, began in earnest to build a covert chemical weapons program three decades ago, aided by its neighbors, allies and European chemical wholesalers.
Damascus lacked the technology and scientific capacity to set up a program on its own, but with backing from foreign allies it amassed what is believed to be one of the deadliest stockpiles of nerve agent in the world, Western military experts said.
"Syria was quite heavily reliant on outside help at the outset of its chemical weapons program, but the understanding now is that they have a domestic chemical weapons production capability," said Amy Smithson of the James Martin Center for Nonproliferation Studies in Washington, an expert on nuclear, biological and chemical weapons.
As Syria's civil war enters its third year with 80,000 dead, chemical weapons are reported to have been used by the government of President Bashar al-Assad, and there are also fears they could fall into the hands of militants seeking to destabilize the region.
As a result of the wars of 1967, 1973 and 1982, Syria sought to counter Israel's military superiority.
Non-conventional weapons have already been used in the region. The late Iraqi President Saddam Hussein used chemical weapons such as mustard gas and other nerve agents during the 1980s, including the killing of 5,000 Kurds in Halabja, during the war with Iran.
Syria's ally Iran is accused by the West of seeking to develop an atomic bomb, which it denies, while Israel refuses to confirm or deny whether it has nuclear weapons.
"Syria had to have something to stack up against Israel," Smithson told Reuters.
United Nations human rights investigators said on Tuesday they had "reasonable grounds" to believe that limited amounts of chemical weapons had been used in Syria. They had received allegations that government forces and rebels had used the banned weapons, but most testimony related to their use by the government.
Syria is one of only seven countries not to have joined the 1997 Chemical Weapons Convention, which commits members to completely destroying their stockpiles.
Syria does not generally comment on its chemical weapons, but in July last year it acknowledged for the first time that it had them. Foreign Ministry spokesman Jihad Makdissi told a news conference the army would not use chemical weapons to crush the rebels but could use them against foreign forces.
While it is relatively easy to produce small amounts of chemicals, scaling up to megaton quantities of precursors needed for weapons of mass destruction requires long-term, industrial-grade processing facilities with advanced equipment.
The first technology and delivery systems were most probably obtained from the Soviet Union and pre-revolution Egypt, military experts believe, while chemical precursors came from European companies.
To boost its own capabilities, Damascus set up the Scientific Studies and Research Centre (SSRC), an agency with a civilian figure head that was run by military intelligence.
It is "the best-equipped research center in Syria, possessing better technical capacity and equipment than the four Syrian universities," the Nuclear Threat Initiative, a leading non-proliferation group, wrote last month.
The SSRC, attacked by rebels earlier this year, oversees chemical weapons facilities in Dumayr, Khan Abou, Shamat, and Firaqlus, according to the U.S. Center for Strategic and International Studies. It set up facilities for blister agent, sarin, mustard and VX nerve gas, the Center said.
The agency is now headed by one of Assad's top advisers, national security chief Ali Mamlouk, said Brigadier General Mustafa al Sheikh, a Syrian army defector.
"The man overseeing the chemical weapons in general is Ali Mamlouk, but effective control of the weapons is becoming fragmented," Sheikh, who served for almost two decades in chemical weapons units, told Reuters from an undisclosed location in northern Syria. "Assad himself has lost overall command and control."
Mamlouk, on a list of Syrians targeted by EU sanctions since 2011, was promoted last year to head national security after its chief was killed in a bombing in Damascus. Considered to be a member of Assad's inner circle, Mamlouk is one of two Syrian officers indicted last August in Beirut for allegedly plotting to incite sectarian violence in Lebanon. Efforts to reach Mamlouk for comment were unsuccessful.
Sheikh said the arsenal is now in the hands of chemical weapons-trained loyalists of Assad's Alawite clan, a Shi'ite offshoot sect, and is being used for limited attacks that have killed dozens of rebels.
"Most of the chemical weapons have been transported to Alawite areas in Latakia and near the coast, where the regime has the capability to fire them using fairly accurate medium range surface-to-surface missiles," Sheikh said.
Some chemical munitions remain in bases around Damascus, and have been deployed with artillery shells. "It is a matter of time before fairly large warheads are used," he said.
A U.S. official, asked about Sheikh's comments, told Reuters: "This is one concerning scenario we're taking a close look at."
Reports of use of chemical weapons in the battlefield have become more frequent in recent weeks. A U.N. team of inspectors has been denied access and has been unable to verify the claims.
The bulk of chemical and biological weapons production technology came from "large chemical brokerage houses in Holland, Switzerland, France, Austria and Germany," said Globalsecurity, a security information provider.
In the early 1980s, Syria mostly imported French pharmaceuticals, some of them so-called "dual use" chemicals, which could also be used for chemical weapons, it said.
A wide range of industrial chemicals with legal applications, such as in agriculture, are also precursors for chemical weapons. The most important precursors for sarin, the nerve agent believed to have been used in recent fighting in Syria, are methylphosphonyl difluoride and isopropanol.
None of the reports cited named specific companies as suppliers. Syria has said it intended to use the chemicals for agriculture.
Securing raw chemicals on the international market became more difficult in 1985, when suspect sales were restricted by the Australia Group, a 40-nation body that seeks to curb chemical or biological weapons through export controls.
Some experts say Damascus obtained supplies from Russia and Iran instead, but Syria may also have turned to a network of illegal traders using front companies to sell to Iran and Iraq.
Former Russian general Anatoly Kuntsevich was suspected of smuggling precursor chemicals to VX gas to Syria, according to Globalsecurity. He died in 2002.
While questions remain about the origins of Syria's chemical weapons stockpile, an evaluation by the U.S. government in March leaves little doubt about the threat it poses.
"Syria's overall chemical weapons program is large, complex, and geographically dispersed, with sites for storage, production, and preparation," the Director of National Intelligence wrote.
It "has the potential to inflict mass casualties, and we assess that an increasingly beleaguered regime, having found its escalation of violence through conventional means inadequate, might be prepared to use chemical weapons against the Syrian people."
Additional reporting by Phillip Stewart in Washington; Editing by Giles Elgood