Abstract. The paper studies the economy and ecology of sheep farming at the farm level and includes 2 different categories of the animals, ewes (adult females) and lambs. The model is analyzed in a Nordic economic and biological setting. During the outdoor grazing season, animals face limited grazing resources so that the weight gain of lambs is determined by the per-animal vegetation consumption. On the other hand, the number of grazing animals, lambs as well as ewes, determines the grazing pressure. This problem is studied under the assumption of a rational and well-informed farmer who aims to maximize profit in ecological equilibrium with zero animal and vegetation growth. We find that lamb-only slaughtering is optimal and that it is never beneficial for the farmer to keep livestock that overgraze pasture. It is also shown that higher meat prices and more profitable slaughtering make it economically rewarding for the farmer to keep more animals. A numerical illustration indicates that the optimal sheep farming decision may be more sensitive to changes in pasture quality and productivity than changes in economic conditions.