Coastal pastures provide supplementary foraging habitats for migratory shorebirds that rely on intertidal areas outside the breeding season. However, their role as foraging grounds for shorebirds is poorly understood. Here, we assessed the food supply, prey size selection, foraging behaviour and estimated consumption of a migratory shorebird, the near-threatened Eurasian Curlew Numenius arquata, at two temperate coastal pastures in northern Spain. Wintering Curlews only fed on earthworms (Oligochaeta), the main food available at coastal pastures. Average density and biomass were 102.3 ± 22.2 earthworms/m2 and 5.8 ± 1.3 g AFDW/m2, respectively, and only the density of surface living (i.e. epigeic) earthworms declined at the end of the winter. This food supply was comparatively high with respect to the biomass available in other man-made coastal habitats used by shorebirds wintering in temperate regions. Unexpectedly, the density of Curlews was higher at the pasture with the lowest food availability, though it declined significantly throughout the season at this site. Interestingly, Curlews preferentially selected the smallest size class (<32.5 mm) of epigeic earthworms, implying that a trade-off between energy intake rate and other fitness components could exist. Estimated consumption by Curlews was consistent with observed reductions in earthworm densities at both sites, thus reflecting a robust interaction between Curlews and epigeic earthworms at these agroecosystems throughout the non-breeding season. Our results highlight the potential role of earthworm communities at coastal pastures as food supply for declining migratory shorebirds.