The M2 protein from influenza A virus is a pH-activated proton channel that mediates acidification of the interior of viral particles entrapped in endosomes. M2 is the target of the anti-influenza drugs amantadine and rimantadine; recently, resistance to these drugs in humans, birds and pigs has reached more than 90% (ref. 1). Here we describe the crystal structure of the transmembrane-spanning region of the homotetrameric protein in the presence and absence of the channel-blocking drug amantadine. pH-dependent structural changes occur near a set of conserved His and Trp residues that are involved in proton gating. The drug-binding site is lined by residues that are mutated in amantadine-resistant viruses. Binding of amantadine physically occludes the pore, and might also perturb the pK(a) of the critical His residue. The structure provides a starting point for solving the problem of resistance to M2-channel blockers.