KirBac1.1 and 3.1 are bacterial homologues of mammalian inward rectifier K channels. We have performed extended molecular dynamics simulations (five simulations, each of >20 ns duration) of the transmembrane domain of KirBac in two membrane environments, a palmitoyl oleoyl phosphatidylcholine bilayer and an octane slab. Analysis of these simulations has focused on the conformational dynamics of the pore-lining M2 helices, which form the cytoplasmic hydrophobic gate of the channel. Principal components analysis reveals bending of M2, with a molecular hinge at the conserved glycine (Gly134 in KirBac1.1, Gly120 in KirBac3.1). More detailed analysis reveals a dimer-of-dimers type motion. The first two eigenvectors describing the motions of M2 correspond to helix kink and swivel motions. The conformational flexibility of M2 seen in these simulations correlates with differences in M2 conformation between that seen in the X-ray structures of closed channels (KcsA and KirBac) in which the helix is undistorted, and in open channels (e.g. MthK) in which the M2 helix is kinked. Thus, the simulations, albeit on a time scale substantially shorter than that required for channel gating, suggest a gating model in which the intrinsic flexibility of M2 about a molecular hinge is coupled to conformational transitions of an intracellular 'gatekeeper' domain, the latter changing conformation in response to ligand binding.