Understanding a species' feeding ecology is essential for successful management and conservation, because food abundance can influence body mass, survival, reproductive success, movements, and habitat use. We describe annual and seasonal variations in the diet of brown bears Ursus arctos in southcentral Sweden, based on analysis of 527 fecal samples from 1994–1996 and 2000–2001. There was distinct seasonal variation in most of the 26 food items we documented. Ungulates, predominantly moose Alces alces, and insects comprised most of the estimated dietary energy content in spring and summer. Insects were represented almost entirely by ants, of which Formica spp. and Camponotus herculeanus were the most common. During autumn, berries dominated the diet. The most important berry species were bilberry Vaccinium myrtillus, crowberry Empetrum hermaphoditum and lingonberry V. vitis‐idaea. We determined berry availability by inventorying 308 random plots three times for two consecutive years. These three berries occurred with great spatial, seasonal and annual variation in abundance. The bears showed the strongest positive preference for bilberries, a lesser positive preference for crowberries, but no preference for lingonberries. The proportion of berries in the autmn diet was stable between years, but the relative importance of the species changed, indicating that bears switched to crowberries when bilberries were less abundant. The effects of predicted future climatic change might have severe effects on the availability of the berries, which is the only important food available for fat acquisition prior to hibernation.