Amazon.com briefly became the most valuable company on Wall Street in intraday trade yesterday, days after Microsoft dethroned long-time leader Apple.
Amazon rose by 4.7% at one point, putting its market capitalisation at $865 billion.
At the same time, Apple traded up 2.1%, giving it a market capitalisation of $864.8 billion.
Microsoft, which on Friday closed above Apple's market capitalisation for the first time in eight years, was up 0.9%, leaving its stock market value at $859 billion, third in the group.
Amazon's lead lasted only a few seconds.
At the close, Apple was back on top with a 3.49% increase in its stock that put its total value at $877 billion.
It was followed by Amazon, up 4.86% with a market capitalisation of $866.6 billion, and then Microsoft, up 1.08% and a stock market value of $860.4 billion.
The tight race between the trio of high-powered technology stocks coincided with a broad stock market rally after the US and China agreed on a temporary truce in their ongoing trade dispute.
Apple in August became the first US publicly listed company to reach a $1 trillion market capitalisation.
But its share price has fallen sharply in recent months as investors worried that demand for iPhones was losing steam.
Its market capitalisation overtook Microsoft's in 2010 as Microsoft struggled with slow demand for personal computers, due in part to the explosion of smartphones like the iPhone.
Amazon's stock has recovered most of the ground it lost after the online retailer in October forecast disappointing sales for the key Christmas holiday quarter.
Although it is down about 13% from its September 4 record-high close, in the year to date Amazon's stock is up 51%, compared with a 31% rise for Microsoft and Apple's 9% increase.