Apple and Google announced a partnership Friday to try to use technology to trace the spread of the coronavirus pandemic.

The two companies, usually fierce rivals, said they would work together in the coming weeks to build new tools that would enable people and health authorities to track the virus using Bluetooth proximity data from their smartphones.

“We hope to harness the power of technology to help countries around the world slow the spread of COVID-19 and accelerate the return of everyday life,” the two companies said in a rare joint statement.

Outside experts had been pleading with the two companies to join forces in just such an effort because of their unique position controlling the operating systems for the vast majority of the phones in the U.S. and Europe.

The companies said they plan to openly publish information about their work for others to analyze, and they began Friday by releasing some draft materials.

“Privacy, transparency, and consent are of utmost importance in this effort, and we look forward to building this functionality in consultation with interested stakeholders,” they said in their statement.

California Gov. Gavin Newsom said his office spoke Friday with Apple about the tracing technology and is making it a part of the state’s planning for easing out of its statewide stay-at-home order.

Google and Apple said their work would come in two stages. In the first stage, next month, they plan to release a set of tools known as application programming interfaces (APIs) so that apps created by public health authorities could work on both iPhones and on phones that run Google’s Android operating system.

Then, in the second stage over the coming months, the two companies would build a voluntary tracing system directly into their iOS and Android operating systems.

“This is a more robust solution than an API and would allow more individuals to participate, if they choose to opt in, as well as enable interaction with a broader ecosystem of apps and government health authorities,” the companies said.

Versions of coronavirus tracking apps already exist in China, Singapore, Israel and elsewhere, but efforts have been slower in the U.S. and Europe, because of concerns about privacy and because “contact tracing” must be combined with widespread testing in order to work.

The idea is that an app could remember, via anonymous Bluetooth signals, which other phones have been nearby. If someone you had coffee with two days ago tests positive for the coronavirus, you would get a notification along the lines of "you may have recently been exposed" — and advising temporary isolation.

Download the NBC News app for full coverage of the coronavirus outbreak

Privacy advocates have raised alarms that “contact tracing” smartphone apps could become part of a permanent surveillance structure, though Apple and Google emphasized that would not be the case with anything they deploy.

One technology researcher who was already organizing similar efforts said the involvement of two big companies was good news.

“This is the type of Apple-Google collaboration we’ll need to get anonymous coronavirus exposure notifications to be practical,” said Peter Eckersley, an artificial intelligence researcher who convened an informal group of like-minded experts called stop-covid.tech.

Eckersley said it would now be up to other collaborators in government and the private sector to demonstrate that the tools from Google and Apple could be used to provide timely, helpful and private notifications when people are at risk.

Some experts are skeptical the technology will work. Traditional contact tracing is done by human beings conducting labor-intensive interviews with people who test positive and with their contacts.

“Cell phone-based apps recording proximity events between individuals are unlikely to have adequate discriminating ability or adoption to achieve public health utility,” researchers from Duke University said in a briefing paper Tuesday.

But Apple and Google, because of their sizes, may be able to deliver that wide adoption.

The companies also emphasized that anything they deploy would be private and voluntary, possibly reassuring privacy advocates have raised alarms that contact-tracing smartphone apps could become part of a permanent surveillance structure.

Michael Veale, an assistant professor at University College London who’s been researching the use of Bluetooth technology to slow coronavirus, praised the approach of Google and Apple. He said their system seems designed to ensure that personal information doesn’t end up on government servers.

“Governments were hoping that Apple and Google would just let them have access to the Bluetooth sensor,” Veale said. “Apple is saying we don’t need to do that to have a contact tracing system and is forcing them to adopt a system that the scientists and privacy engineers say is much less capable of abuse.”

But the system will still need to figure out ways to deal with bad actors. Ashkan Soltani, a former chief technology officer for the Federal Trade Commission, said he worried that tech companies won’t be able to stop abuse of the system by, for example, someone entering themselves as a false positive case in order to “cry wolf” and cause havoc.