The ideal free distribution theory predicts that mobile species distribute themselves among habitat patches so as to optimize their fitness. Changes in land use alter the quality of habitat patches and thereby affect the distribution of species. Following the loss of native habitat, habitat specialists are expected to move to patches where native habitat still remains in order to survive. Competition for resources in habitat remnants should consequently increase. As generalists are able to use other habitats, generalists are expected to gradually disappear in remnants in order to avoid increasing competition with specialists. Here, we test these predictions by studying the response of habitat specialist and generalist birds to land-use change in Brazil's southern grasslands. Using a space-for-time substitution approach, we surveyed bird communities in native grassland sites (~4 ha) in 31 regions (10 × 10 km) with differing levels of conversion to agriculture (1–94%). We found a higher abundance of specialists in native grassland patches with increasing agricultural cover in the region, while the total number of individuals in remnants remained constant. At the same time, the share of generalists in total abundance and total species richness decreased. To gain insights into whether these patterns could be driven by shifts in competition, we tested whether generalists that continued to co-occur with specialists in remnants, had less dietary overlap with specialists. As a consequence of community composition in remnants, a higher proportion of generalists were omnivorous and the average generalist species fed less on seeds, whereas the average specialist species fed more on seeds when agricultural cover was high in the region. Our results, therefore, support predictions of the ideal free distribution theory. Specialists that are assumed to have a low survivorship outside of their specialized habitat, distribute to remnants of this habitat when it is converted elsewhere, while generalists, being able to survive in other habitats, disappear gradually in remnants. Such a process could partly explain the segregation of habitat specialist and generalist birds observed in many agricultural landscapes. Finally, our results suggest that native habitat remnants can be important temporary refugia for specialists.