Elon Musk is just a Tesla stock rally away from unseating fellow mega-billionaire — and occasional verbal sparring partner — Bill Gates as the second-richest person on the planet.

As of Thursday, Musk’s net worth was $123 billion, $5 billion shy of Gates on the Bloomberg Billionaires Index, a ranking of the world’s 500 richest people.

Bloomberg News reported that Musk’s net worth soared $10.2 billion on Wednesday after Tesla shares climbed 10% on the strength of an overweight rating by Morgan Stanley. Analyst Adam Jonas predicted in a note that the company was on the brink of transitioning from being mainly a car-retailing business to one with multiple revenue streams from products like software and services.

It was the second day of banner gains for Musk. His fortune rose $7.6 billion on Tuesday after the electric-car maker was named for inclusion in the S&P 500 Index. Tesla’s meteoric rise this year boosted Musk’s net worth by $95 billion since January, the most of anyone on the Bloomberg index.

Tesla shares had sagged a bit by Friday, extending the gap. But another week like this past one would easily vault Musk past Gates: By Friday’s close, Tesla shares had climbed 19.3% from their Monday opening price, while Microsoft shares had slipped 2.1%.

The two visionary tech billionaires have traded barbs this year in sometimes heated exchanges on Twitter or through interviews, Bloomberg noted. The confrontational Musk, who once said his conversations with the Microsoft co-founder were “underwhelming,” tweeted in September that Gates had “no clue” about electric trucks, responding to a blog post Gates authored in which he suggested electricity probably wouldn’t be a practical solution for powering heavy, long-haul vehicles.

But it’s the pandemic that’s sparked the sharpest words between the two. Musk, 49, has frequently downplayed the risks of COVID-19, questioned data about its spread and fatality and made wildly optimistic projections about the course of the disease.

Gates, 65, whose charitable foundation is largely dedicated to public health, dismissed Musk’s comments. “I hope that he doesn’t confuse areas he’s not involved in too much,” he told CNBC.

Seattle Times staff contributed to this report.