ISRAEL’S high-tech sector seems to be a land of milk and honey. Scarcely a month passes without another announcement of a foreign tech giant buying a local firm. In 2015 Israeli startups raised a record $4.4 billion in venture capital, up by 30% from the previous year. Yet the country once christened the “startup nation” is losing steam. Between 1998 and 2012 the tech industry grew on average by 9% annually, more than double the rate of Israel’s GDP. In all but one of the past six years, the tech sector has expanded at a slower rate than the overall economy.

The main cause for the slowdown is a growing shortage of trained workers, according to a recent report by the chief economist of the ministry of finance. This may come as a surprise, given the country’s reputation for having a deep pool of tech talent, mainly because of the Israel Defence Forces (IDF), which rely heavily on technology and churn out thousands of highly skilled workers. But a complex mix of social, educational and business factors is increasingly constraining the size of Israel’s tech workforce.

There is a limit to the size of any industry a small country of only 8m people can sustain. Until recently, the tech industry was helped by two trends: academics and employees of state-owned industries moving into the private sector and the arrival of tens of thousands of Jewish engineers emigrating from the former Soviet Union. Both these sources of fresh talent have now dried up, even as others remain obstructed. Two growing parts of the Israeli population are underrepresented in the job market: Israeli Arabs and the ultra-Orthodox, who together make up around 25% of the population. Israel’s universities are producing fewer engineers, too: the share of graduates with science degrees is down from 12% in 1998 to 9% in 2014.

At the same time, demand for skilled tech workers continues to grow, and not just in the private sector. The IDF need to keep their trained operatives longer, for instance to expand their cyber-warfare capabilities. Competition for such personnel is fierce: many are snapped up by firms offering twice the pay the army does.

Moreover, the Israeli tech industry doesn’t make the best use of the talent available. Many workers want to start their own firm, rather than toiling at a big one, meaning that most firms are tiny with only a handful of employees. Israeli entrepreneurs also tend to seek swift “exits” and quickly sell their startup to foreign companies. As a result, the country’s tech firms are not creating training schemes, points out Yigal Erlich of Yozma, the outfit that seeded many Israeli venture-capital funds.

The government has started to take action. Naftali Bennett, the education minister and a former high-tech entrepreneur himself, has launched an emergency plan to boost the number of students studying mathematics. For the first time in Israeli history, government economists are considering long-term work visas for foreign engineers. The IDF, for their part, have streamlined their training courses and now provide soldiers with the option of online distance-learning, so they can enhance their skills on the job. “But there is a limit to what we can do. Conscription is down due to demographic reasons and few of the new conscripts arrive with basic tech skills,” says Danny Bren, a former commander of the IDF’s Lotem Unit, the main provider of computer and networking services for the army.

Israel may have to take still more radical steps. One could be to provide more Israeli Arabs and ultra-Orthodox Jews with the skills necessary to work in the tech industry. Another potential source of talent are the more than 4m Palestinians living in the West Bank and the Gaza Strip, over 50,000 of whom are already allowed to work in Israel, but mainly on building sites and other low-paid jobs. Before Israel imports engineers from Asia, it should consider its closest neighbours.