Calcium-activated chloride channels (CaCCs) encoded by TMEM16A control neuronal signalling, smooth muscle contraction, airway and exocrine gland secretion, and rhythmic movements of the gastrointestinal system. To understand how CaCCs mediate and control anion permeation to fulfil these physiological functions, knowledge of the mammalian TMEM16A structure and identification of its pore-lining residues are essential. TMEM16A forms a dimer with two pores. Previous CaCC structural analyses have relied on homology modelling of a homologue (nhTMEM16) from the fungus Nectria haematococca that functions primarily as a lipid scramblase, as well as subnanometre-resolution electron cryo-microscopy. Here we present de novo atomic structures of the transmembrane domains of mouse TMEM16A in nanodiscs and in lauryl maltose neopentyl glycol as determined by single-particle electron cryo-microscopy. These structures reveal the ion permeation pore and represent different functional states. The structure in lauryl maltose neopentyl glycol has one Ca2+ ion resolved within each monomer with a constricted pore; this is likely to correspond to a closed state, because a CaCC with a single Ca2+ occupancy requires membrane depolarization in order to open (C.J.P. et al., manuscript submitted). The structure in nanodiscs has two Ca2+ ions per monomer and its pore is in a closed conformation; this probably reflects channel rundown, which is the gradual loss of channel activity that follows prolonged CaCC activation in 1 mM Ca2+. Our mutagenesis and electrophysiological studies, prompted by analyses of the structures, identified ten residues distributed along the pore that interact with permeant anions and affect anion selectivity, as well as seven pore-lining residues that cluster near pore constrictions and regulate channel gating. Together, these results clarify the basis of CaCC anion conduction.