Ongoing expansion of large-scale agriculture critically threatens natural habitats and the pollination services they offer. Creating patches with high plant diversity within farmland is commonly suggested as a measure to benefit pollinators. However, farmers rarely adopt such practice, instead removing naturally occurring plants (weeds). By combining pollinator exclusion experiments with analysis of honeybee behaviour and flower-visitation webs, we found that the presence of weeds allowed pollinators to persist within sunflower fields, maximizing the benefits of the remaining patches of natural habitat to productivity of this large-scale crop. Weed diversity increased flower visitor diversity, hence ameliorating the measured negative effects of isolation from natural habitat. Although honeybees were the most abundant visitors, diversity of flower visitors enhanced honeybee movement, being the main factor influencing productivity. Conservation of natural patches combined with promoting flowering plants within crops can maximize productivity and, therefore, reduce the need for cropland expansion, contributing towards sustainable agriculture.