Three years ago, Iran decided to run its government computer system on open-source software. The Islamic Republic had long relied on pirated copies of Microsoft’s software, a result of the U.S. embargo that forbids American companies from providing technical support to Iran. Officials in Tehran said the switch would free them from another form of U.S. hegemony. But they probably never guessed it would also give Iran one of the most advanced corps of female coders anywhere in the world.

A recent European Union survey found that only 1.5 percent of European open-source coders are female. Not so in Iran, where, by some estimates, half of all software engineers coming out of the country’s universities are women. Of the three coders who developed Iran’s first official open-source project, two were women.

What’s behind the rise of women in Iran’s open-source movement? With the restrictions put on women in the Middle East, technology is an attractive option for those who want a career. Technological work, and coding in particular, can be done from home, allowing ambitious women to become well-known within their industry without becoming taboo in their communities. "They feel freer, and the anonymity allows for career choices that are more serious and more interesting," says Mahnaz Afkhami, an Iranian women’s rights activist.

Similar patterns are now emerging elsewhere in the Middle East. In Syria, which is also under a U.S. embargo, women are estimated to make up at least 50 percent of the coding workforce. In many ways, it’s no coincidence. Women in both countries consistently score well in math and science. For Iranian female coder Mahsa Mojtahedi, open-source coding was a natural career choice. It "gives me a lot of opportunities — and good offers," she says. It’s one instance in which technology could be trumping tradition.