Crystallographic studies of K(+) channels in the closed (KcsA) and open (MthK) states suggest that Gly(99) (KcsA numbering) in the inner helices serves as a gating hinge during channel activation. However, some P-loop channels have larger residues in the corresponding position. The comparison of x-ray structures of KcsA and MthK shows that channel activation alters backbone torsions and helical H-bonds in residues 95-105. Importantly, the changes in Gly(99) are not the largest ones. This raises questions about the mechanism of conformational changes upon channel gating. In this work, we have built a model of the open KcsA using MthK as a template and simulated opening and closing of KcsA by constraining C-ends of the inner helices at a gradually changing distance from the pore axis without restraining mobility of the helices along the axis. At each imposed distance, the energy was Monte Carlo-minimized. The channel-opening and channel-closing trajectories arrived to the structures in which the backbone geometry was close to that seen in MthK and KcsA, respectively. In the channel-opening trajectory, the constraints-induced lateral forces caused kinks at midpoints of the inner helices between Val(97) and Gly(104) but did not destroy interdomain contacts, the pore helices, and the selectivity filter. The simulated activation of the Gly(99)Ala mutant yielded essentially similar results. Analysis of interresidue energies shows that the N-terminal parts of the inner helices form strong attractive contacts with the pore helices and the outer helices. The lateral forces induce kinks at the position where the helix-breaking torque is maximal and the intersegment contacts vanish. This mechanism may be conserved in different P-loop channels.