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 Pentagons surprise decision announced Oct. 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’ 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 worlds biggest online retailer pared the decline. The index, which tracks the wealth of the richest 500 people, is updated each trading day after United States (US) markets close.

Europe’s richest person, Bernard Arnault, is third with $102.7 billion.

Microsoft has surged 48 per cent this year, boosting the value of Gatess 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 had not 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.

Read: The Jeff Bezos divorce: $136 billion, Amazon in the middle

Gates recently shared his thoughts on the wealth tax thats been proposed by some Democratic presidential candidates, including Elizabeth Warren, saying hes already paid more than $10 billion in taxes.

“If I had to pay $20 billion, its fine. But when you say I should pay $100 billion, then Im starting to do a little math about what I have left over,” he said.

As of today, that would be $10 billion.

comment COMMENT NOW