Drug metabolism is the metabolic breakdown of drugs by living organisms, usually through specialized enzymatic systems. More generally, xenobiotic metabolism (from the Greek xenos "stranger"  and biotic "related to living beings") is the set of metabolic pathways that modify the chemical structure of xenobiotics, which are compounds foreign to an organism's normal biochemistry, such as any drug or poison. These pathways are a form of biotransformation present in all major groups of organisms and are considered to be of ancient origin. These reactions often act to detoxify poisonous compounds (although in some cases the intermediates in xenobiotic metabolism can themselves cause toxic effects). The study of drug metabolism is called pharmacokinetics.
 The metabolism of pharmaceutical drugs is an important aspect of pharmacology and medicine. For example, the rate of metabolism determines the duration and intensity of a drug's pharmacologic action. Drug metabolism also affects multidrug resistance in infectious diseases and in chemotherapy for cancer, and the actions of some drugs as substrates or inhibitors of enzymes involved in xenobiotic metabolism are a common reason for hazardous drug interactions. These pathways are also important in environmental science, with the xenobiotic metabolism of microorganisms determining whether a pollutant will be broken down during bioremediation, or persist in the environment. The enzymes of xenobiotic metabolism, particularly the glutathione S-transferases are also important in agriculture, since they may produce resistance to pesticides and herbicides.
 Drug metabolism is divided into three phases. In phase I, enzymes such as cytochrome P450 oxidases introduce reactive or polar groups into xenobiotics. These modified compounds are then conjugated to polar compounds in phase II reactions. These reactions are catalysed by transferase enzymes such as glutathione S-transferases. Finally, in phase III, the conjugated xenobiotics may be further processed, before being recognised by efflux transporters and pumped out of cells. Drug metabolism often converts lipophilic compounds into hydrophilic products that are more readily excreted.[citation needed]
 The exact compounds an organism is exposed to will be largely unpredictable, and may differ widely over time; these are major characteristics of xenobiotic toxic stress. The major challenge faced by xenobiotic detoxification systems is that they must be able to remove the almost-limitless number of xenobiotic compounds from the complex mixture of chemicals involved in normal metabolism. The solution that has evolved to address this problem is an elegant combination of physical barriers and low-specificity enzymatic systems.
 All organisms use cell membranes as hydrophobic permeability barriers to control access to their internal environment. Polar compounds cannot diffuse across these cell membranes, and the uptake of useful molecules is mediated through transport proteins that specifically select substrates from the extracellular mixture. This selective uptake means that most hydrophilic molecules cannot enter cells, since they are not recognised by any specific transporters. In contrast, the diffusion of hydrophobic compounds across these barriers cannot be controlled, and organisms, therefore, cannot exclude lipid-soluble xenobiotics using membrane barriers.
 However, the existence of a permeability barrier means that organisms were able to evolve detoxification systems that exploit the hydrophobicity common to membrane-permeable xenobiotics. These systems therefore solve the specificity problem by possessing such broad substrate specificities that they metabolise almost any non-polar compound. Useful metabolites are excluded since they are polar, and in general contain one or more charged groups.
 The detoxification of the reactive by-products of normal metabolism cannot be achieved by the systems outlined above, because these species are derived from normal cellular constituents and usually share their polar characteristics. However, since these compounds are few in number, specific enzymes can recognize and remove them. Examples of these specific detoxification systems are the glyoxalase system, which removes the reactive aldehyde methylglyoxal, and the various antioxidant systems that eliminate reactive oxygen species.
 The metabolism of xenobiotics is often divided into three phases: modification, conjugation, and excretion. These reactions act in concert to detoxify xenobiotics and remove them from cells.
 In phase I, a variety of enzymes act to introduce reactive and polar groups into their substrates. One of the most common modifications is hydroxylation catalysed by the cytochrome P-450-dependent mixed-function oxidase system. These enzyme complexes act to incorporate an atom of oxygen into nonactivated hydrocarbons, which can result in either the introduction of hydroxyl groups or N-, O- and S-dealkylation of substrates. The reaction mechanism of the P-450 oxidases proceeds through the reduction of cytochrome-bound oxygen and the generation of a highly-reactive oxyferryl species, according to the following scheme:
 Phase I reactions (also termed nonsynthetic reactions) may occur by oxidation, reduction, hydrolysis, cyclization, decyclization, and addition of oxygen or removal of hydrogen, carried out by mixed function oxidases, often in the liver. These oxidative reactions typically involve a cytochrome P450 monooxygenase (often abbreviated CYP), NADPH and oxygen. The classes of pharmaceutical drugs that utilize this method for their metabolism include phenothiazines, paracetamol, and steroids. If the metabolites of phase I reactions are sufficiently polar, they may be readily excreted at this point. However, many phase I products are not eliminated rapidly and undergo a subsequent reaction in which an endogenous substrate combines with the newly incorporated functional group to form a highly polar conjugate.
 A common Phase I oxidation involves conversion of a C-H bond to a C-OH. This reaction sometimes converts a pharmacologically inactive compound (a prodrug) to a pharmacologically active one. By the same token, Phase I can turn a nontoxic molecule into a poisonous one (toxification). Simple hydrolysis in the stomach is normally an innocuous reaction, however there are exceptions. For example, phase I metabolism converts acetonitrile to HOCH2CN, which rapidly dissociates into formaldehyde and hydrogen cyanide.
 Phase I metabolism of drug candidates can be simulated in the laboratory using non-enzyme catalysts. This example of a biomimetic reaction tends to give products that often contains the Phase I metabolites. As an example, the major metabolite of the pharmaceutical trimebutine, desmethyltrimebutine (nor-trimebutine), can be efficiently produced by in vitro oxidation of the commercially available drug.  Hydroxylation of an N-methyl group leads to expulsion of a molecule of formaldehyde, while oxidation of the O-methyl groups takes place to a lesser extent.
 Cytochrome P450 reductase, also known as NADPH:ferrihemoprotein oxidoreductase, NADPH:hemoprotein oxidoreductase, NADPH:P450 oxidoreductase, P450 reductase, POR, CPR, CYPOR, is a membrane-bound enzyme required for electron transfer to cytochrome P450 in the microsome of the eukaryotic cell from a FAD- and FMN-containing enzyme NADPH:cytochrome P450 reductase
The general scheme of electron flow in the POR/P450 system is:
NADPH
→
FAD
→
FMN
→
P450
→
O2
 During reduction reactions, a chemical can enter futile cycling, in which it gains a free-radical electron, then promptly loses it to oxygen (to form a superoxide anion).
 In subsequent phase II reactions, these activated xenobiotic metabolites are conjugated with charged species such as glutathione (GSH), sulfate, glycine, or glucuronic acid. Sites on drugs where conjugation reactions occur include carboxy (-COOH), hydroxy (-OH), amino (NH2), and thiol (-SH) groups. Products of conjugation reactions have increased  molecular weight and tend to be less active than their substrates, unlike Phase I reactions which often produce active metabolites. The addition of large anionic groups (such as GSH) detoxifies reactive electrophiles and produces more polar metabolites that cannot diffuse across membranes, and may, therefore, be actively transported.
 These reactions are catalysed by a large group of broad-specificity transferases, which in combination can metabolise almost any hydrophobic compound that contains nucleophilic or electrophilic groups. One of the most important classes of this group is that of the glutathione S-transferases (GSTs).
 After phase II reactions, the xenobiotic conjugates may be further metabolized. A common example is the processing of glutathione conjugates to acetylcysteine (mercapturic acid) conjugates. Here, the γ-glutamate and glycine residues in the glutathione molecule are removed by gamma-glutamyl transpeptidase and dipeptidases. In the final step, the cysteine residue in the conjugate is acetylated.
 Conjugates and their metabolites can be excreted from cells in phase III of their metabolism, with the anionic groups acting as affinity tags for a variety of membrane transporters of the multidrug resistance protein (MRP) family. These proteins are members of the family of ATP-binding cassette transporters and can catalyse the ATP-dependent transport of a huge variety of hydrophobic anions, and thus act to remove phase II products to the extracellular medium, where they may be further metabolized or excreted.
 The detoxification of endogenous reactive metabolites such as peroxides and reactive aldehydes often cannot be achieved by the system described above. This is the result of these species' being derived from normal cellular constituents and usually sharing their polar characteristics. However, since these compounds are few in number, it is possible for enzymatic systems to utilize specific molecular recognition to recognize and remove them. The similarity of these molecules to useful metabolites therefore means that different detoxification enzymes are usually required for the metabolism of each group of endogenous toxins. Examples of these specific detoxification systems are the glyoxalase system, which acts to dispose of the reactive aldehyde methylglyoxal, and the various antioxidant systems that remove reactive oxygen species.
 Quantitatively, the smooth endoplasmic reticulum of the liver cell is the principal organ of drug metabolism, although every biological tissue has some ability to metabolize drugs.
Factors responsible for the liver's contribution to drug metabolism include that it is a large organ, that it is the first organ perfused by chemicals absorbed in the gut, and that there are very high concentrations of most drug-metabolizing enzyme systems relative to other organs.
If a drug is taken into the GI tract, where it enters hepatic circulation through the portal vein, it becomes well-metabolized and is said to show the first pass effect.
 Other sites of drug metabolism include epithelial cells of the gastrointestinal tract, lungs, kidneys, and the skin.
These sites are usually responsible for localized toxicity reactions.
 The duration and intensity of pharmacological action of most lipophilic drugs are determined by the rate they are metabolized to inactive products.
The Cytochrome P450 monooxygenase system is the most important pathway in this regard.
In general, anything that increases the rate of metabolism (e.g., enzyme induction) of a pharmacologically active metabolite will decrease the duration and intensity of the drug action.
The opposite is also true (e.g., enzyme inhibition). However, in cases where an enzyme is responsible for metabolizing a pro-drug into a drug, enzyme induction can speed up this conversion and increase drug levels, potentially causing toxicity.
 Various physiological and pathological factors can also affect drug metabolism.
Physiological factors that can influence drug metabolism include age, individual variation (e.g., pharmacogenetics), enterohepatic circulation, nutrition, intestinal flora, or sex differences.
 In general, drugs are metabolized more slowly in fetal, neonatal and elderly humans and animals than in adults.
 Genetic variation (polymorphism) accounts for some of the variability in the effect of drugs.
With N-acetyltransferases (involved in Phase II reactions), individual variation creates a group of people who acetylate slowly (slow acetylators) and those who acetylate quickly, split roughly 50:50 in the population of Canada.
This variation may have dramatic consequences, as the slow acetylators are more prone to dose-dependent toxicity.
 Cytochrome P450 monooxygenase system enzymes can also vary across individuals, with deficiencies occurring in 1–30% of people, depending on their ethnic background.
 Dose, frequency, route of administration, tissue distribution and protein binding of the drug affect its metabolism.
 Pathological factors can also influence drug metabolism, including liver, kidney, or heart diseases.
 In silico modelling and simulation methods allow drug metabolism to be predicted in virtual patient populations prior to performing clinical studies in human subjects. This can be used to identify individuals most at risk from adverse reaction.
 Studies on how people transform the substances that they ingest began in the mid-nineteenth century, with chemists discovering that organic chemicals such as benzaldehyde could be oxidized and conjugated to amino acids in the human body. During the remainder of the nineteenth century, several other basic detoxification reactions were discovered, such as methylation, acetylation, and sulfonation.
 In the early twentieth century, work moved on to the investigation of the enzymes and pathways that were responsible for the production of these metabolites. This field became defined as a separate area of study with the publication by Richard Williams of the book Detoxication mechanisms in 1947. This modern biochemical research resulted in the identification of glutathione S-transferases in 1961, followed by the discovery of cytochrome P450s in 1962, and the realization of their central role in xenobiotic metabolism in 1963.