Formation of the glycosidic bond in lactose is an example of the second phase of the general acetal formation reaction. In the general mechanism, after dehydration of the hemiacetal under acid catalysis, a second alcohol attacks the carbon of the resonant oxonium cation and forms the acetal. In lactose formation, playing the role of the hemiacetal is UDP-galactose
(UDP leaving group promotes oxoniuim cation formation like acid catalysis does in the general mechanism). The alcohol in the reaction is the C-4 hydroxyl of the second sugar, glucose. This hydroxyl attacks the galactose C1 (anomeric) carbon from above, producing a β orientation in the resulting disaccharide, a β-1-4 glycosidic linkage.