The deadline for Dutch livestock farmers to accept a government buyout and close their operations expired at midnight Friday, with 1,112 farmers signing on, the Agriculture Ministry said on Saturday, a figure that falls short of the 1,500 the government had hoped for but still represents the largest voluntary exit from farming in the country’s modern history.

The program, which offered farmers up to 120 percent of the value of their businesses on the condition that they never farm livestock again anywhere in the European Union, is the centerpiece of the Netherlands’ effort to cut emissions of nitrogen compounds that have damaged protected heathlands and bogs. Together, the participating farms account for about 410,000 pigs, 118,000 dairy cows and 4.6 million chickens, roughly 3 percent of the national herd.

“It is a painful number for every family behind it, and an insufficient number for the nature we are legally obliged to protect,” said the agriculture minister, Marjolein de Wit, in a statement. The buyouts will cost about 2.9 billion euros, or roughly $3.1 billion.

The Netherlands has the highest livestock density in Europe, with about 3.8 animals per hectare of farmland, and a 2019 ruling by the country’s highest administrative court froze thousands of construction and infrastructure permits on the grounds that nitrogen deposition near nature reserves already exceeded legal limits. The government has since tried a series of measures, from lower highway speed limits to stricter manure rules, none of which has fully unlocked the permit system.

For farmers, the decision has been wrenching. Gerrit Bosman, 61, a dairy farmer near Deventer whose family has worked the same land since 1902, signed his buyout papers on Thursday. “Three generations, and I am the one who closes the gate,” he said. “My son does not want it, the bank does not want it, and the government is offering a number I will never see again. So I take it, and I do not sleep.” His 95 cows will be sold by December.

Farm lobbying groups argue the government is hollowing out rural communities. “Every farm that closes takes a feed supplier, a veterinarian and a contractor with it,” said Hendrik Jan Rutgers, chairman of the Dutch Agricultural and Horticultural Organization. He said that about 60 percent of the farmers who accepted the offer were over 58, suggesting the program had mostly accelerated retirements rather than changed the sector’s structure.

Environmental groups called the result inadequate. “Three percent of the herd is not a transition, it is a rounding error,” said Femke Noordam of the conservation group Natuurmonumenten. The ministry said it would publish a further plan for compulsory measures near the most damaged reserves by the end of the year.