Clandestine chemistry is chemistry carried out in secret, and particularly in illegal druglaboratories. Larger labs are usually run by gangs or organized crime intending to produce for distribution on the black market. Smaller labs can be run by individual chemists working clandestinely in order to synthesize smaller amounts of controlled substances or simply out of a hobbyist interest in chemistry, often because of the difficulty ascertaining the purity of other, illegally synthesized drugs obtained on the black market. The term clandestine lab is generally used in any situation involving the production of illicit compounds, regardless of whether the facilities being used qualify as a true laboratory.

Prepared substances (as opposed to those that occur naturally in a consumable form, such as cannabis and psilocybin mushrooms) require reagents. Some drugs, like cocaine and morphine, are extracted from plant sources and refined with aid of chemicals. Semi-synthetic drugs such as heroin are made starting from alkaloids extracted from plant sources which are the precursors for further synthesis. In the case of heroin, a mixture of alkaloids is extracted from the opium poppy (Papaver somniferum) by placing small incisions in its bulb - a milky fluid bleeds out of the incisions which is then left to dry out and scraped off the bulbs, yielding raw opium. Morphine, one of many alkaloids in opium, is then extracted out of the opium by precipitation and turned into heroin by heating it with acetic anhydride for several hours. Other drugs (such as methamphetamine and MDMA) are normally made from commercially available chemicals, though both can also be made from naturally occurring precursors. Methamphetamine is also sometimes made from ephedrine, one of the naturally occurring alkaloids in ephedra (Ephedra sinica). MDMA can be made from safrole, the major constituent of several etheric oils like sassafras. 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 such as anhydrous ammonia and iodine 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 illicit drugs, usually requiring licences or permits to ensure that the purchaser has a legitimate need for them.

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 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.

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, many illicit drugs are still widely available all over the world.

Operation Purple is a U.S. DEA driven international chemical control initiative designed to reduce the illicit manufacture of cocaine in the Andean Region, 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. However, illicit chemists always find new methods to evade the DEA's scrutiny.

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 neighbouring 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 and recycled solvents like ether. Some non-solvent fuels such as gasoline, kerosene and diesel fuel are even used in place of solvents. Manufacturers 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 for overseas consumption.

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).

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 route to heroin laboratories in Afghanistan. Authorities in Uzbekistan, Turkmenistan, Kyrgyzstan, and Kazakhstan routinely seize ton-quantity shipments of diverted acetic anhydride.

The lack of acetic anhydride has caused clandestine chemists in some countries to substitute it for lower quality precursors such as acetic acid and results in the formation of impure black tar heroin that contains a mixture of drugs not found in heroin made with pure chemicals.

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 618,902,223 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.

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 data is showing a distinct downward trend in the seizure quantities of clandestine drug labs for the illicit manufacture of methamphetamine from a high of 15,196 in 2010. Seizure quantities, on the other hand, are steadily increasing since 2007, according to data from STRIDE (see table to the right).

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.[citation needed]