SAN FRANCISCO – Google is buying online mapping service Waze in a $1.03 billion deal that keeps a potentially valuable tool away from its rivals while allowing it to gain technology that could improve the accuracy and usefulness of its own popular navigation system.

The acquisition announced Tuesday ends several months of speculation as Waze flirted with potential buyers interested in its rapidly growing service. Waze blends elements of a social network into its maps to produce more precise directions and more reliable information about local traffic conditions.

Google is believed to have trumped two of its fiercest foes, Facebook and Apple, in the bidding for Waze, which is based in Israel but maintains a Palo Alto, Calif., office near all three of the Silicon Valley giants.

"We evaluated many options and believe Google is the best partner," Waze CEO Noam Bardin wrote in a Tuesday blog post.

Financial terms of the deal weren't disclosed, but the Associated Press confirmed the sale price with a person familiar with the negotiations.

The price underscores the increasing importance of digital maps as people frequently check navigation services on their smartphones and tablet computers. That creates more opportunities to show moneymaking ads, particularly those from local merchants. Google can also link the navigation systems to other applications to help generate more revenue.

Forrester Research analyst Julie Ask expects maps to become a main gateway on mobile devices, much like Internet search engines have been on personal computers. "A growing percentage of time will be spent discovering, accessing and engaging content within maps," Ask predicted.

Google is the leader in the field, but both Apple and Facebook would like a bigger piece of the market.

Those ambitions are likely a key reason Google scooped up Waze, said University of Notre Dame management professor Brian Proffitt, who specializes in technology issues. "Getting Waze is like a billion-dollar remedy to a potential headache for Google," he said.

Waze says nearly 50 million drivers in 190 countries use its mapping app to avoid traffic jams and find the fastest way to their jobs and other destinations. The service figures out the most efficient routes by drawing upon real-time information shared by about 70,000 members who help edit the maps and even provide other helpful tips, such as where to find the best gasoline prices.