Selective ion conduction across ion channel pores is central to cellular physiology. To understand the underlying principles of ion selectivity in tetrameric cation channels, we engineered a set of cation channel pores based on the nonselective NaK channel and determined their structures to high resolution. These structures showcase an ensemble of selectivity filters with a various number of contiguous ion binding sites ranging from 2 to 4, with each individual site maintaining a geometry and ligand environment virtually identical to that of equivalent sites in K(+) channel selectivity filters. Combined with single channel electrophysiology, we show that only the channel with four ion binding sites is K(+) selective, whereas those with two or three are nonselective and permeate Na(+) and K(+) equally well. These observations strongly suggest that the number of contiguous ion binding sites in a single file is the key determinant of the channel's selectivity properties and the presence of four sites in K(+) channels is essential for highly selective and efficient permeation of K(+) ions.