Bloomberg released its annual Global Innovation Index this week, and Israel was ranked fifth worldwide. Given Israel’s reputation as the “start-up nation,” that may not seem surprising (in fact, it should, but that’s a topic for another post). Yet “start-up nation” has become such a cliché that it often obscures one of the most important–and admirable–qualities behind Israel’s tech successes: a consistent determination to turn lemons into lemonade.

This is true in many walks of Israeli life. Back in 2007, for instance, I wrote a column about the astounding fact that after losing a child in a war or terror attack, Israeli parents had repeatedly responded not with a desire for revenge, but with a desire to commemorate their child by doing something to make the world a better place. Consequently, bereaved parents in Israel have set up everything from public parks to foundations that help families care for special-needs children.

In the high-tech field, this same quality has led Israel to respond to a horrendous security environment by creating products that not only serve immediate defense needs, but have the potential to benefit humanity as a whole. And this response has played a major role in fueling its tech boom.

Take, for instance, the Iron Dome anti-missile system, which was born of the grim need to deal with nonstop rocket fire from Hamas-run Gaza. Though the system proved spectacularly successful during last summer’s war, it initially seemed to have limited application; few other countries routinely suffer rocket attacks from their neighbors.

Now, however, an Israeli-Canadian partnership is busy turning the technology behind Iron Dome into a system for smart electrical grid management. As the Jerusalem Post reported last month, “The same algorithms that help Iron Dome respond to complex inputs quickly and efficiently were applied to monitoring and controlling the electric grid,” which will both save energy and help reduce blackouts. The new technology “has the potential to change grid management in North America and beyond,” according to Henri Rothschild, president of the Canada-Israel Industrial R&D Foundation, which helped broker the joint venture.

Another example is a start-up that literally makes potable water out of thin air. Founder Arye Kohavi, whom Foreign Policy named as one of its 100 leading global thinkers last year, said he first began mulling this issue during his compulsory military service, when he discovered that supplying water to frontline troops in Lebanon or Gaza was a major logistical problem. Thus his original idea was a portable kit that soldiers could take into the field with them, enabling them to generate their own water supply with no input other than air–an idea he successfully pitched to Israel’s Defense Ministry, which enthusiastically backed the venture.

But with growing areas of the globe increasingly threatened by shortages of fresh water, Kohavi’s invention clearly has uses far beyond the military. After the Philippines suffered a severe earthquake in 2013, for instance, the Israel Defense Forces used one of his Water-Gen company’s devices on its disaster-relief mission there. Kohavi is currently working on other civilian applications for his product.

And there are numerous other examples. Just last week, for instance, Reuters ran a story about Israeli tech firms that had designed products to help disabled veterans and are now adapting them to the civilian market.

Israel isn’t the only country in the world that has been at war for decades. But few other countries have taken this obvious drawback and leveraged it into a spate of high-tech development that is benefiting people all over the globe. That determination to turn lemons into lemonade is a major source of Israel’s success–and not just in high-tech.