Seattle, San Francisco: Amazon.com Inc vaulted ahead of internet rival Alphabet Inc in market value for the first time, a sign of growing investor optimism about the prospects for the world’s largest online retailer as it reaches into new markets such as groceries, health insurance and consumer devices.

Shares of the Seattle-based e-commerce giant rose 2.7 per cent at the close in New York on Tuesday, giving it a market capitalisation of $768 billion. That made it the world’s second-most valuable publicly traded company behind Apple Inc. Google parent Alphabet was little changed, putting its value at $762.6 billion.

The shift underscores the value that investors see in Amazon’s e-commerce hub, which draws 196 million unique visitors a month and keeps offering new products and services. Yet the stock market may be even more attuned to Amazon’s massive lead in the cloud-computing market, where it’s far ahead of Microsoft Corp. and Google, as well as its foray into groceries and early success in voice-controlled devices, gadgets that embed Amazon deeper into consumers’ everyday lives.

Google and Amazon once had very different core businesses. Now, the two are increasingly going head-to-head on several fronts. Google has invested heavily in the cloud market, which offers computing power and data storage, to catch Amazon Web Services. Google is also chasing Amazon in the market for voice-controlled digital assistants — the Amazon Echo outsells competing devices and, more alarming to Google, could replace searching on the web for most users.

Google still dominates digital advertising. Despite Alphabet’s ventures into fields like self-driving cars and biotechnology, Google ads, a $95.4 billion business last year, still accounts for 86 per cent of total sales. But Amazon is making inroads there. Brands and manufacturers see Amazon as an effective place to hawk their wares because people visit the site already intending to buy something, while those browsing Google are often just seeking information. Amazon is also pouring money into its live-streaming service, Twitch, and premium video offering, which both compete with Google’s YouTube.

Drama

The rivalry between the companies can often get messy, limiting consumer access to products and services. Most recently, Amazon stopped selling some of Google’s Nest home-security devices on its web store. To retaliate, Google disabled YouTube from Amazon devices, including the Fire TV.

The surge also adds to the drama in the race to $1 trillion market value, with Apple remaining the front-runner at $889.2 billion. Still, Amazon has been the company to watch for the past three years, with market gains far outpacing Alphabet, Apple and Microsoft, making founder and Chief Executive Officer Jeff Bezos the world’s wealthiest person. The slightest hint of interest from Bezos in a new business line, such as health-care or banking, can send stocks of potential competitors tumbling, thanks to his reputation for making big investments and sticking with them.

“Every opportunity the company is going after is a $500 million to a $1 billion market,” said James Cakmak, an analyst at Monness Crespi Hardt & Co. And each market Amazon is pursuing is a distinctive one — something that has eluded Apple and Google, which are both heavily reliant on a single business for their sales. “At the end of the day, they’re a one-trick pony,” said Cakmak.