Jeff Bezos is at risk of losing the title of world’s richest person to Bill Gates, as Amazon.com Inc. stock slid Friday.

Shares of the biggest online retailer fell 4% to $1,712 at 9:45 a.m. in New York, a day after reporting its first profit decline in two years. At that price, Bezos has a net worth of $107.1 billion, about $300 million less than Gates, according to the Bloomberg Billionaires Index. Bezos took the top spot from the Microsoft Corp. co-founder in October 2017. The ranking officially updates after the close of each trading day in the U.S., so any change won’t be official until Friday’s market close.

Microsoft, the world’s most valuable company, has surged 38% this year, boosting the value of Gates’s 1% stake and bringing his fortune to $107.4 billion. The rest of his wealth is derived from share sales and investments made over the years by his family office, Cascade. Gates, 63, remains an aggressive stock investor, with more than 60% of his portfolio in equities, he said last month in a Bloomberg Television interview.

Bezos, 55, would have had no trouble retaining the top ranking 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 would drop to $34.5 billion with Amazon shares priced at $1,712, and she’d remain the world’s fourth-richest woman.

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.