They turned to technology, developing equipment that boosted output - from cooling systems to milk meters and biometrics - and have made Israeli cows the most productive in the world.
Science rules today, with cows' health, output, genetics and fertility closely monitored by management systems. In kibbutzes, or communal farms, across the country, they line up by the dozens to enter climate-controlled sheds, awaiting the latest innovations in robotic milking that drive up efficiency.
This has put the country's agricultural tech, and the companies that provide it, in demand around the world as - with populations and dairy consumption on the rise - traditional farming methods are no longer cutting it.
Smallholder and grazing farms are, for the most part, not competitive. Large, mechanized farms that intensely monitor production and maximize yields are the order of the day.
In the United States, for example, milk production has risen by almost half since 1970, even though the number of cows has declined by about a quarter.
Developing countries, particularly in Asia, want to upgrade their outdated dairy industries and are looking to Israel for products and expertise. So are foreign investors hoping to stay ahead of the curve.
India is the biggest milk producer in the world, but most of it comes from farmers with few resources. Average production
levels per cow are low, to the frustration of policymakers.
"We're missing a huge export opportunity to Europe and other countries," said Devendra Fadnavis, chief minister of Maharashtra, who came to Israel to find a solution.
"I think with Israeli technology we can take our farms to the next level."
In Vietnam, a group of Israeli companies led by systems developer Afimilk is building a $200 million dairy farm, one of the largest projects of its kind in the world. It will eventually supply half the milk in Vietnam.
Israeli agriculture has benefited from a boom in the country's wider hi-tech industry, which has become a major growth engine and investment magnet. The country leads the OECD when it comes to R&D, spending 4.3 percent of GDP on it, nearly twice the OECD average, according to Ernst & Young.
Companies often tap into the skills of workers trained in the military or intelligence sectors and start-ups benefit from tax breaks and government funding.
The global market for dairy farming technologies is worth about $850 million a year, according to industry sources. Israel exports in the sector totaled $110 million in 2014, up 7 percent rise from a year earlier, according to the country's export institute.
Software company Akol runs a database that monitors the output, health, genetics and fertility of every cow in Israel. The database helped lift productivity to a world record of 12,083 kg per cow in 2014. By comparison, in the United States the average was 10,097 kg.
Akol has partnered with Microsoft in a joint venture to bring the technology to the developing world.
"We understood that to reach the world we need a strong cloud computing system that analyses every component of the quality of the milk. Microsoft saw this could be a breakthrough," said Akol Chief Executive Ron Shani.