Clandestine chemistry
Clandestine chemistry generally refers to chemistry carried out in illegal drug laboratories, but can include any kind of laboratory operation carried on in secret. It is important to distinguish between large and small scale clandestine labs. Larger labs are usually run by gangs or organized crime with the intention of production for distribution on the black market. Small labs are usually run by individual chemists working clandestinely in order to synthesize small amounts of controlled substances for their own use in order to guarantee purity and quality. This is often because it is difficult to ascertain the purity or authenticity of illegally synthesized drugs that can be obtained on the black market. Note that the term "clandestine lab" is generally used in any situation involving the production of illict chemicals, even when the facilities being used can hardly qualify as a laboratory.

# History
Ancient forms of clandestine chemistry included the manufacturing of poisons.
Another old form of clandestine chemistry is the illegal brewing and distillation of alcohol. This was frequently done to avoid taxation on spirits.
In the United States in the 1920s, alcohol was on prohibition. This opened a door for brewers to supply their own town with alcohol. Just like modern day drug labs, distilleries were placed in rural areas. The term moonshine generally referred to "corn whiskey", that is, a whiskey-like liquor made from corn. American made corn whiskey is now referred to as Bourbon.

# Precursor chemicals
Prepared substances (as opposed to those that occur naturally in a consumable form, such as cannabis and hallucinogenic mushrooms) require reagents. Semi-synthetic drugs like cocaine and heroin are made starting from plant sources and are usually easy to make, with only a few steps required to reach the final product. Other drugs (such as methamphetamine and MDMA) are normally made from commercially available chemicals. (MDMA can also be made from safrole, found in small amounts in a wide variety of plants.)  Governments have adopted a strategy of chemical control as part of their overall drug control and enforcement plans. Chemical control offers a means of attacking illicit drug production and disrupting the process before the drugs have entered the market.
Because many legitimate industrial chemicals are also necessary in the processing and synthesis of most illicitly produced drugs, preventing the diversion of these chemicals from legitimate commerce to illicit drug manufacturing is a difficult job. Governments often place restrictions on the purchase of large quantities of chemicals that can be used in the production of illict drugs, usually requiring licences or permits to ensure that the purchaser has a legitimate need for them. Furthermore, since so many chemicals listed as illicit drug precursors are manufactured all over the world, international cooperation combined with a comprehensive chemical control strategy is essential for chemical control policies to succeed.

# Leading suppliers of precursor chemicals
Chemicals critical to the production of cocaine, heroin, and synthetic drugs are produced in many countries throughout the world. Many manufacturers and suppliers exist in Europe, China, India, the United States, and a host of other countries.
Historically, chemicals critical to the synthesis or manufacture of illicit drugs are introduced into various venues via legitimate purchases by companies that are registered and licensed to do business as chemical importers or handlers. Once in a country or state, the chemicals are diverted by rogue importers or chemical companies, by criminal organizations and individual violators, or, more typically seen in an overseas environment, acquired as a result of coercion on the part of drug traffickers. In response to stricter international controls, drug traffickers have increasingly been forced to divert chemicals by mislabeling the containers, forging documents, establishing front companies, using circuitous routing, hijacking shipments, bribing officials, or smuggling products across international borders.

# Enforcement of controls on precursor chemicals
Operation Purple is a U.S. DEA driven international chemical control initiative designed to reduce the illicit manufacture of cocaine in the Andean Region by monitoring and tracking shipments of potassium permanganate (PP), the chemical oxidizer of choice for cocaine production. The cornerstone of the operation is an intensive PP tracking program aimed at identifying and intercepting diverted potassium permanganate; identifying rogue firms and suspect individuals; gathering intelligence on diversion methods, trafficking trends, and shipping routes; and taking administrative, civil, and/or criminal action as appropriate. Critical to the success of this operation is the communication network that gives notification of shipments and provides the government of the importer sufficient time to verify the legitimacy of the transaction and take appropriate action. The effects of this initiative have been dramatic and far-reaching. Operation Purple has exposed a significant vulnerability among traffickers, and has grown to include almost thirty nations. According to the DEA, Operation Purple has been highly effective at interfering with cocaine production.
Acetic anhydride (AA), the most commonly used chemical agent in heroin processing, is virtually irreplaceable. According to the DEA, Mexico remains the only heroin source country that has indigenous acetic anhydride production capability, producing 87,000 metric tons in 1999 alone. All other heroin producing countries must import large amounts of acetic anhydride. The diversion of this chemical to Colombian heroin laboratories is a continuing problem. The DEA reports that in 1999 three major hijackings of tanker trucks containing acetic anhydride occurred in Colombia. A total of 95.9 metric tons of AA was stolen, an amount sufficient to supply the Colombian heroin trade for the next five years. However, the largest markets for diverted acetic anhydride continue to be heroin laboratories in Afghanistan and Burma. Of particular note was a March 2000 seizure of 72.8 metric tons of AA in Turkmenistan, en route to heroin laboratories in Afghanistan. Authorities in Uzbekistan, Turkmenistan, Kyrgyzstan, and Kazakhstan routinely seize ton quantity shipments of diverted acetic anhydride.
DEA's Operation Topaz is a coordinated international strategy targeting acetic anhydride. In place since March 2001, a total of thirty-one countries are currently organized participants in the program in addition to regional participants. The DEA reports that as of June 2001, some 125 consignments of acetic anhydride had been tracked totaling 61,890,222.85 kilograms. As of July 2001, there has been approximately 20 shipments of AA totaling 185,000 kilograms either stopped or seized.
The methamphetamine situation changed in the mid-1990s with the entrance of Mexican organized crime into production and distribution. According to the DEA, the seizure of 3.5 metric tons of pseudoephedrine (the primary precursor chemical used in the production of methamphetamine) in Texas revealed that Mexican trafficking groups were producing methamphetamine on an unprecedented scale.
In countries where strict chemical controls have been put in place, illicit drug production has been seriously affected. For example, few of the chemicals needed to process coca leaf into cocaine are manufactured in Bolivia or Peru. Most are smuggled in from neighboring countries with advanced chemical industries or diverted from a smaller number of licit handlers. Increased interdiction of chemicals in Peru and Bolivia has contributed to final product cocaine from those countries being of lower, minimally oxidized quality.
As a result, Bolivian lab operators are now using inferior substitutes such as cement instead of lime and sodium bicarbonate instead of ammonia, recycled solvents like ether, and are attempting to streamline a production process that virtually eliminates oxidation to produce cocaine base. Some laboratories are not using sulfuric acid during the maceration state; consequently, less cocaine alkaloid is extracted from the leaf, producing less cocaine hydrochloride, the powdered cocaine marketed in the United States. Similarly, heroin-producing countries depend on supplies of acetic anhydride from the international market. This heroin precursor continues to account for the largest volume of internationally seized chemicals, according to the International Narcotics Control Board. Since July 1999, there have been several notable seizures of acetic anhydride in Turkey (amounting to nearly seventeen metric tons) and Turkmenistan (totaling seventy-three metric tons).
The Multilateral Chemical Reporting Initiative encourages governments to exchange information on a voluntary basis in order to monitor international chemical shipments. Over the past decade, key international bodies like the Commission on Narcotic Drugs and the U.N. General Assembly's Special Session (UNGASS) have addressed the issue of chemical diversion in conjunction with U.S. efforts. These organizations raised specific concerns about potassium permanganate and acetic anhydride.
To facilitate the international flow of information about precursor chemicals, the United States, through its relationship with the Inter-American Drug Control Abuse Commission (CICAD), continues to evaluate the use of precursor chemicals and assist countries in strengthening controls. Many nations still lack the capacity to determine whether the import or export of precursor chemicals is related to legitimate needs or illicit drugs. The problem is complicated by the fact that many chemical shipments are either brokered or transshipped through third countries in an attempt to disguise their purpose or destination.
The International Narcotics Control Board (INCB) has opted to organize an international conference with the goal of devising a specific action plan to counter the traffic in MDMA precursor chemicals. In July 2001, the INCB requested the assistance of DEA in planning an international conference on preventing the diversion of chemicals used in the production of amphetamine-type stimulants (ATS), including MDMA (ecstasy) and methamphetamine.
Despite this long history of law enforcement actions, restrictions of chemicals, and even covert military actions, it must be noted that many illicit drugs are still widely available all over the world.

# Amphetamines
Clandestine chemistry made its mark in the late 1960s when amphetamines became controlled substances in many countries. Biker gangs including the Hells Angels took control over the manufacture of amphetamines using standard laboratory equipment.
Methamphetamine was a favorite among biker gangs, but after phenylacetone became a Schedule II controlled immediate precursor in 1979, it was harder for underground chemists to manufacture methamphetamine.
Frustrated, underground chemists searched for alternative methods for producing methamphetamine. The two predominant methods which appeared both involve the reduction of ephedrine or pseudoephedrine to methamphetamine. At the time, neither was a watched chemical, and pills containing the substance could be bought by the thousands without raising any kind of suspicion.
In the 1990s, ephedrine / pseudoephedrine became a closely watched precursor by the DEA, making it somewhat more difficult for underground chemists to produce methamphetamine. Many individual States have enacted precursor control laws which limit the sale of over-the-counter cold medications which contain ephedrine or pseudoephedrine.
DEA El Paso Intelligence Center EPICdata is showing a distinct downward trend in the seizure of clandestine drug labs for the illicit manufacture of methampetamine from a high of 17,356 in 2003. Lab seizure data for the United States is available from EPIC beginning in 1999 when 7,438 labs were reported to have been seized during that calendar year.

# Explosives
Clandestine chemistry does not limit itself only to drugs, it is also associated with explosives, and other illegal chemicals. Of the explosives manufactured illegally nitroglycerin and acetone peroxide are easiest to produce due to the ease with which the precursors can be acquired.
Uncle Fester is a writer who commonly writes about different aspects of clandestine chemistry. Secrets of Methamphetamine Manufacture is among one of his most popular books, and is considered required reading for DEA Agents. More of his books deal with other aspects of clandestine chemistry, including explosives, and poisons.  Fester is, however, considered by many to be a faulty and unreliable source for information in regard to the clandestine manufacture of chemicals.  To his credit, he pioneered the use of potassium hydroxide (KOH) in the field of polymer chemistry.

# Presently
With the rise of the Internet, access to information on topics such as the extraction of dextromethorphan (DXM) from over the counter cough medicine or the manufacture of simple explosives has become far easier than in the past.  This has been cause for concern among some, due to minors attempting these procedures.