Amazon is now worth more than Microsoft.

Amazon's market value — its closing share price multiplied by the number of shares outstanding — rose to $702.5 billion on Wednesday, and for the first time passed Microsoft, which is worth $699.2 billion as of the close of trading.

Only Apple and Alphabet are now ahead of Amazon among the most valuable companies in the world. Microsoft is fourth, followed by China's Tencent and Facebook, as the six biggest companies by market cap all come from the technology industry.

Amazon climbed 2.6 percent on Wednesday to $1451.05, while Microsoft rose 1.6 percent to $90.81.

With Amazon's 73 percent surge over the past year, CEO Jeff Bezos has become the world's richest person, surpassing — you guessed it — Microsoft co-founder Bill Gates. Still, Microsoft shares have notched a 41 percent rally in the past 12 months and the software maker remains flush with cash.

The two companies come from very different places, with Amazon dominating e-commerce and Microsoft owning the desktop. But they're now going head to head in cloud infrastructure, where Amazon's big early lead is generating plenty of excitement on Wall Street.