SAN FRANCISCO Amazon, Microsoft and Alphabet are locked in a tight race to become the second publicly-listed U.S. company to reach a $1 trillion stock market value after Apple became the first to touch the 13-digit milestone.

Clientes pasan frente al logo de Apple en una tienda de la empresa en Nueva York, ago 1, 2018. REUTERS/Lucas Jackson

Wall Street’s optimism about last year’s 10th anniversary iPhone, coupled with record share buybacks, have propelled Apple’s stock 34 percent higher over the past 12 months, pushing the company’s stock market value above $1 trillion on Thursday.

The Cupertino, California company’s shares added another 0.3 percent on Friday, putting its market capitalization at $1.005 trillion.

Apple’s 12-month gain is far better than the S&P 500’s 14 percent increase over the past year, but it pales beside Amazon’s astounding 85 percent surge, propelled by the online retailer’s and cloud computing heavyweight’s scorchingly fast revenue and profit growth.

Amazon is now the second-largest publicly-listed U.S. company, with a market capitalization of $889 billion, followed closely by Alphabet and Microsoft, at $856 billion and $830 billion respectively.

Google-owner Alphabet’s stock has risen 32 percent over the past 12 months, and is up nearly 18 percent in 2018.

Together with Facebook, the five largest U.S. companies account for 15 percent of the S&P 500.

Synovus Trust portfolio manager Dan Morgan said he owns shares of Amazon mostly because of its dominance of the cloud computing industry, a business that grew 42 percent in the June quarter and provided most of Amazon’s operating profits.

“Of the three companies, I’d say Amazon will get to $1 trillion next,” Morgan said.

Average analyst price targets put Apple’s stock market value at $1.05 trillion, Amazon at $1.02 trillion, Alphabet at $970 billion and Microsoft at $953 billion, according to Thomson Reuters data.

To be sure, past stock gains are not a reliable predictor of future performance, and the surge in Amazon shares in recent years has been exceptional by most standards. But Amazon’s market capitalization would overtake Apple’s later in 2018 if both companies shares were to continue their 12-month growth pace.

(Graphic: Beyond the $1 trillion market cap)