The hypotheses tested were that the expected preference of sheep for a food with adequate rumen degradable protein (RDP) supplemented with urea would be reduced both by the addition of a buffer (sodium bicarbonate (SB)) and by offering ad libitum access to hay. A control food (C), calculated to be adequate in its ratio of effective RDP to fermentable metabolizable energy (fME), was formulated. Other foods were made by adding 12·5 (U1) or 25 (U2) g urea per kg fresh matter (FM) to C and 20 g SB per kg FM to C, U1 and U2. The acid buffering capacity (ABC) of each food was measured in vitro. The experiment consisted of two successive periods, each of 4 weeks. Ninety-eight female, Texel ✕ Greyface sheep were randomly allocated to 14 groups each with seven animals. Groups 1 to 6 were offered one of: C, U2, C + SB, U2 + SB, C with hay or U2 with hay throughout the experiment. Groups 7 to 10 were offered the choices of C v. U1 or C v. U2, either with or without hay in a change-over design; animals that received hay during period 1 (groups 8 and 10) did not do so during period 2 and vice versa (groups 7 and 9). Groups 11 to 14 (no. = 7) were offered the choices of C v. U1 or C v. U2, either with or without SB supplemented to both foods, in a change-over design. Adding either urea, or SB, or both to C had no effects on intake or live-weight gain when offered alone. Both supplements significantly (P 0·001) increased the ABC of food C. Throughout the experiment hay consumption was very low (overall mean: 23 (s.e. 2·5) g hay per sheep day). Offering hay caused no change in the preference for the urea-supplemented foods. Sheep offered the choices C v. U1 or C v. U2, with neither hay nor SB, selected 0.466 (s.e. 0·036) and 0.588 (s.e. 0·025) kg/kg total food intake (TFI) of U1 and U2 respectively. The proportions of the urea-supplemented foods were significantly reduced (P 0.01) by SB supplementation: to 0.348 (s.e.0·045) and 0·406 (s.e.0·059) kg/kg TFI of U1 and U2 respectively. The effect of SB addition on the diet selection of sheep could be due to its buffering properties. When SB is added to both foods the need for urea to be used as a buffer is reduced with a consequent decrease in the proportion selected as the urea-supplemented food. Effects of diet on buffering may override other diet selection objectives, such as the avoidance of an excess intake of RDP.