Ion-selective channels enable the specific permeation of ions through cell membranes and provide the basis of several important biological functions; for example, electric signalling in the nervous system. Although a large amount of electrophysiological data is available, the molecular mechanisms by which these channels can mediate ion transport remain a significant unsolved problem. With the recently determined crystal structure of the representative K+ channel (KcsA) from Streptomyces lividans, it becomes possible to examine ion conduction pathways on a microscopic level. K+ channels utilize multi-ion conduction mechanisms, and the three-dimensional structure also shows several ions present in the channel. Here we report results from molecular dynamics free energy perturbation calculations that both establish the nature of the multiple ion conduction mechanism and yield the correct ion selectivity of the channel. By evaluating the energetics of all relevant occupancy states of the selectivity filter, we find that the favoured conduction pathway involves transitions only between two main states with a free difference of about 5 kcal mol(-1). Other putative permeation pathways can be excluded because they would involve states that are too high in energy.