The effect of habitat management is commonly evaluated by measuring population growth, which does not distinguish changes in reproductive success from changes in survival or the effects of immigration or emigration. Management has rarely been evaluated considering complete life cycle of the target organisms, including also possible negative impacts from management. We evaluated the effectiveness of cattle grazing in the restoration of coastal meadows as a breeding habitat for small and medium‐sized ground‐nesting birds by examining the size and demography of a southern dunlin (Calidris alpina schinzii) breeding population. Using a stochastic renesting model that includes within‐season variation in breeding parameters, we evaluated the effect of grazing time and stocking rates on reproduction. The census data indicated that the population was stable when nest trampling was prevented, but detailed demographic models showed that the population on managed meadows was a sink that persisted by attracting immigrants. Even small reductions in reproductive success caused by trampling were detrimental to long‐term viability. We suggest that the best management strategy is to postpone grazing to after the 19th of June, which is about three weeks later than what is optimal from the farmer's point of view. The differing results from the two evaluation approaches warn against planning and evaluating management only based on census population size and highlight the need to consider target‐specific life history characteristics and demography. Even though grazing management is crucial for creating and maintaining suitable habitats, we found that it was insufficient in maintaining a viable population without additional measures that increase nest success. In the presently studied case and in populations with similar breeding cycles, impacts from nest trampling can be avoided by starting grazing when about 70% of the breeding season has past.