The first stage in the conversion of a foreign compound, such as a drug or toxin, into a form that can be eliminated by the body. Common reactions during this phase are oxidation, reduction, and hydrolysis; the resulting metabolites are chemically more reactive than the parent compound, enabling them to undergo the reactions of the second stage (see phase ii metabolism).