Interconversion between conductive and non-conductive forms of the K+ channel selectivity filter underlies a variety of gating events, from flicker transitions (at the microsecond timescale) to C-type inactivation (millisecond to second timescale). Here we report the crystal structure of the Streptomyces lividans K+ channel KcsA in its open-inactivated conformation and investigate the mechanism of C-type inactivation gating at the selectivity filter from channels `trapped' in a series of partially open conformations. Five conformer classes were identified with openings ranging from 12Å in closed KcsA (Cα-Cα distances at Thr112) to 32Å when fully open. They revealed a remarkable correlation between the degree of gate opening and the conformation and ion occupancy of the selectivity filter. We show that a gradual filter backbone reorientation leads first to a loss of the S2 ion binding site and a subsequent loss of the S3 binding site, presumably abrogating ion conduction. These structures indicate a molecular basis for C-type inactivation in K+ channels.