The sense of taste provides animals with valuable information about the nature and quality of food. Bitter taste detection functions as an important sensory input to warn against the ingestion of toxic and noxious substances. T2Rs are a family of approximately 30 highly divergent G-protein-coupled receptors (GPCRs) that are selectively expressed in the tongue and palate epithelium and are implicated in bitter taste sensing. Here we demonstrate, using a combination of genetic, behavioural and physiological studies, that T2R receptors are necessary and sufficient for the detection and perception of bitter compounds, and show that differences in T2Rs between species (human and mouse) can determine the selectivity of bitter taste responses. In addition, we show that mice engineered to express a bitter taste receptor in 'sweet cells' become strongly attracted to its cognate bitter tastants, whereas expression of the same receptor (or even a novel GPCR) in T2R-expressing cells resulted in mice that are averse to the respective compounds. Together these results illustrate the fundamental principle of bitter taste coding at the periphery: dedicated cells act as broadly tuned bitter sensors that are wired to mediate behavioural aversion.