The referendum would have barred the use of the synthetic pesticides in farms and gardens.

ZURICH — Voters in Switzerland on Sunday overwhelmingly rejected a measure that would have banned the use of artificial pesticides in Switzerland, preventing their use in farms and gardens, and prohibited the import of produce and products made using them.

The rejection of the measure, which had enjoyed considerable support in recent months, reflected strong opposition from the Swiss farming sector and the government, which said approval would have meant lower farm production and higher food prices. But public support for curtailing pesticides also prompted the government to come up with a counterproposal that would halve the risks associated with the use of pesticides within six years.

The initiative had been proposed by Future 3, a citizens group that is pushing for a pesticide-free Switzerland. The group’s spokesman, Dominik Waser, said the main motivation was protecting the health of people and the environment.

“Pesticides have a huge influence on our health and it can’t carry on like this,” he said. While the long-term impact of the chemicals is not yet fully known, studies have suggested links between synthetic pesticides and a range of health issues including Parkinson’s and infertility.

Mr. Waser also cited possible ecological issues connected to the spraying of synthetic pesticides.

While a significant portion of organic farmers were in favor of the initiative, the majority of farmers operating the 50,000 farms in Switzerland strongly opposed it.

Hay bales in a field in Switzerland.
Denis Balibouse/Reuters

Martin Rufer, the director of the Swiss Farmers Association, said a total ban on synthetic pesticides would have been “unrealistic” and have major consequences for the agricultural sector and the country. He said farmers wanted to use less pesticides, but that there were not enough viable alternatives to stop completely.

Mr. Rufer predicted that farm production would have slumped by 20 percent to 30 percent had the measure passed, forcing the alpine nation to import more food to make up for the difference. “Food consumption would stay the same,” he said.

David Jacobsen is one Swiss farmer who has been pushing for a pesticide ban.

“We don’t spray away our problems,” said Mr. Jacobsen, standing next to a green field of wheat sprinkled with poppies at his 125-hectare farm, Gut Rheinau, near Zurich.

His farm, which he co-owns, has been producing organic grains, vegetables and fruits without the use of synthetic pesticides for more than 20 years. Using the chemicals, he said, “would decrease our biodiversity and make us dependent because if you use synthetic pesticides once, you have to keep using them.”

Instead, Mr. Jacobsen and his colleagues use crop varieties more resistant to insects and fungi, and have developed ways of growing to increase their yield naturally.

Noele Illien for The New York Times

The Swiss government had urged voters to reject the proposal, fearing that a decrease in agricultural output would push up food prices. It also warned that a full ban would cause more people to cross the border to buy groceries in neighboring countries.

Guy Parmelin, the president of Switzerland and a former grain farmer and wine grower, said the way pesticides were being used in Switzerland had greatly changed in recent years. “More and more so-called conventional farmers are using products authorized in organic farming,” he said.

Mr. Parmelin said sales of synthetic pesticides in Switzerland were decreasing as a result of alternatives like mechanical weeding or the implementation of more sustainable crops.

The initiative was also opposed by the nation’s chocolate industry, which relies heavily on imported ingredients, such as cacao. “We agree with the initiative’s core aim to reduce the use of pesticides,” said Urs Furrer, the director of the Swiss Chocolate Manufacturers Association, Chocosuisse.

But Mr. Furrer said the association felt the government counterproposal — to halve the risks associated with the use of synthetic pesticides by 2027 — was a more realistic approach.

Had the referendum been approved, Mr. Furrer said the price of Swiss chocolate, which would by default have become organic, would have increased and that Switzerland’s share of the global chocolate market would shrink.

“The market for organic chocolate is too small,” he said.