Faced with a growing coronavirus threat, the governor of North Dakota last month posed a question to a friend from his private-sector days. The friend, a software engineer, had once created a location-tracking app for football fans at North Dakota State University who liked to meet up when traveling to big games.

“Can you track people for Covid?” asked the governor, Douglas Burgum. Within days, the engineer, Tim Brookins, had reworked the football app to do just that, he recalled in an interview. The app is now being used in North and South Dakota as part of statewide efforts to ramp up contact tracing for people infected with the coronavirus.

The new app is part of a worldwide scramble to deploy smartphone tools to rein in the pandemic. If the virus’s path can be tracked, even predicted, the hope is that more people will be able to resume at least part of their normal routines — and fewer will need to confine themselves at home.

At their core, the apps are intended to gather information about the movements of people who have tested positive for the virus, alert others who might have crossed their paths, and in some cases make sure infected people stay quarantined. They use smartphone technologies, such as GPS and Bluetooth, to collect and share the data, which make them agile and easy to use but also provide an enticing target for hackers or government surveillance.