London: Microsoft Corp co-founder Bill Gates overtook Amazon.com Inc’s Jeff Bezos as the world’s richest person on Friday, reclaiming the top ranking for the first time in more than two years.

Gates may have been helped in part by the Pentagon’s surprise decision announced October 25 to award a $10 billion cloud-computing contract to Microsoft over Amazon. Shares of Microsoft have since climbed 4 per cent, giving Gates a $110 billion fortune, according to the Bloomberg Billionaires Index. Amazon’s stock is down about 2 per cent since the announcement, putting Bezos’s net worth at $108.7 billion.

Gates, 64, had briefly topped Bezos, 55, on an intraday basis last month after Amazon posted its first profit drop in two years, but shares of the world’s biggest online retailer pared the decline. The index is updated each trading day after US markets close.

Read more: Microsoft Shares Surge After Controversial Pentagon Contract Win

Microsoft has surged 48 per cent this year, boosting the value of Gates’s 1 per cent stake. The rest of his wealth is derived from share sales and investments made over the years by his family office, Cascade.

Bezos would be far richer if he and MacKenzie Bezos hadn’t divorced. The pair announced their split in January, with MacKenzie, 49, receiving a quarter of their Amazon holdings in July. Her net worth dipped to $35 billion on Friday. Gates, on the other hand, may have never relinquished the top spot were it not for his philanthropy. He has donated more than $35 billion to the Bill & Melinda Gates Foundation since 1994.