It’s often said that Silicon Valley is a tech Mecca, but the actual Islamic holy site has technology chops of its own. More than 2 million Muslims will visit the Saudi Arabian city in August to perform the Hajj pilgrimage—a journey every one of Islam’s 1.8 billion adherents must make during their lifetime, if financially and physically able. Keeping those people safe is no small task for the kingdom’s government: In 2015, more than 2,000 pilgrims were killed in a stampede in Mecca’s Mina neighborhood.
Since then, the Saudi government has invested billions in everything from biometrics to blockchain to keep visitors from more than 160 countries safe and comfortable during their visit. Last year, Saudi Arabia hosted its first “Hajj Hackathon”—with coders and entrepreneurs competing over a 36-hour period to build apps and services to streamline the pilgrimage. The winners were an all-female Saudi team who designed a smartphone app to help non-Arabic speakers translate signage without an Internet connection. They received $500,000 in exchange for a 15% equity stake.
This year, the Ministry of Hajj and Umrah is piloting a smart-card initiative with 25,000 pilgrims that will store their identity, medical information, and contact information—and track their location. By modeling this location data, it’s hoped, Saudi authorities will be better able to predict crowd movements and avoid another deadly crush.
Currently, visitor numbers are restricted, and it would take more than 580 years for every living Muslim to visit Mecca for Hajj. But Saudi Arabia hopes it can allow 30 million pilgrims annually by 2030, and technology investment is vital to meeting that ambitious goal.
A version of this article appears in the August 2019 issue of Fortune with the headline “The Modern Pilgrim.”
More must-read stories from Fortune:
—How the government should spend Facebook’s $5 billion fine
—Cloud gaming is big tech’s new street fight
—Should companies bolster their cybersecurity by “hacking back”?
—FaceApp’s Russia link is the latest alarm in an ongoing digital red scare
—Equifax may owe you some money. Here’s how to get it
Catch up with Data Sheet, Fortune‘s daily digest on the business of tech.