“They are in a battle,” said Howard Silverblatt of S&P Dow Jones Indices.

Microsoft slipped into the lead by close of trading on Friday, with a market cap of $851 billion, according to one valuation. Apple was worth $847 billion. Amazon.com was in third at $826 billion.

AD

The technology sector clawed back the ground it has lost as investors’ infatuation with the so-called FAANGs — Facebook, Apple, Amazon.com, Netflix, Google — has cooled.

“This is a sumo wrestling match almost without precedent in the history of corporate America,” Washington investment manager Michael Farr said. “There was a time when Microsoft never even cared about Apple. Apple wasn’t big enough to care about.”

AD

Microsoft’s ascension to the most valuable company would be its first return to the top spot since 2002. Apple has held the No. 1 spot as most valuable company since 2012, when it unseated Exxon.

Past numero unos read like a trip down blue-chip memory lane. Old man General Electric, once a star and now fighting for its life, dominated the 1990s, along with Exxon. The charismatic Jack Welch led GE back then, and Exxon held the commanding heights in the energy industry.

AD

IBM was in the lead position in the 1980s and early 1990s, but Microsoft — then an upstart making something called “software” — soon eclipsed Big Blue as the premier technology company. AT&T, currently struggling to stay relevant, even held the top spot for a time.

Technology and capitalism take their toll, said David Kass, finance professor at the University of Maryland.

“Of the original 12 stocks in the Dow Jones industrial average in 1896, only General Electric survives today — just barely,” Kass said. And in time, “Apple and Microsoft will also be eclipsed.”

AD

Not this past week.

Apple employs 123,000, has annual sales of $265 billion, earned $60 billion in its last fiscal year in profit and is sitting on $122 billion in cash, net of debt. Apple’s stock buybacks — the amount of money it spends just to buy back its shares on public markets — are worth more than most companies.

AD

Apple grew its 2018 revenue by $36.4 billion, which is equivalent to a year of total sales by a Fortune 100 company.

Microsoft turned a $30 billion profit on $110 billion in revenue in its last fiscal year. Microsoft employs 131,000 and has $135 billion in cash on its books.

Microsoft and Apple were launched by rivals, software pioneer Gates and Jobs, the dreamer and design genius.

If Gates is the father of software, then Jobs is the Henry Ford of personal computing.

Turn the time machine to 1997. The companies had gone back and forth for 20 years, with Microsoft holding the upper hand at the time and Apple almost left for dead.

AD

Thanks to its dominance in personal computer software, Microsoft was the third-most valuable company in the United States, worth $156 billion by market capitalization.

AD

Struggling Apple, maker of the seminal Apple II and Macintosh home computers and the PowerBook laptop, back in 1997 was ranked 456th of the top 500 U.S. public companies, worth $1.7 billion, or about 1/90th of its Seattle rival.

The tale since the 21st century began is the story of reinvention for both companies.

Sexy Apple would take off on a decade-long tear on the back of its iPod, iPhone and its charismatic inventor Jobs, a corporate citizen with a cult following who was banished from the company in the mid-1980s, only to return more than a decade later.

Jobs would reinvent his company and indelibly change the way people communicated and spent their free time.

AD

AD

“The iPod was the first gadget, and it replaced the Sony Walkman and cassette tapes,” Farr said. “It was stuff we had never seen before. Apple became the master for gadgets and surged past Microsoft and everybody else.”

Barely-alive Apple soon thrived and eventually would be crowned the world’s most valuable company. It is so rich that it spent $64 billion buying back its shares in the nine months ending Sept. 30, 2018, a record for a U.S. company and enough to buy any of 416 companies in the S&P 500 index.

Boring cash cow Microsoft saw its stock enter hibernation in the early 2000s. The software maker was hugely profitable on its Windows and Office products but unable to replicate the magic that Jobs infused into the Apple brand.

AD

Because of a stream of misfires — remember Kin, Zune, Nokia, Windows Vista? — under then-CEO Steve Ballmer, Microsoft shares sat in stock market Siberia for a decade.

AD

Then 2014 arrived. Satya Nadella took over from Ballmer and pivoted the technology giant into the hugely lucrative and expanding cloud arena with the Azure product. The office ecosystem of Windows and Office 365 became subscription businesses, and along with the company’s move to the cloud — think servers — revenue and profit soared.

So has the stock price.

“The key moment was in 2014 when Satya focused the company on its traditional strengths,” said Todd Bishop, editor at GeekWire and longtime reporter on the Microsoft beat. “They stopped trying to out-Apple Apple. Microsoft went back to doing what it does best. It might not be cool, but it’s clearly valuable.”

AD

“Microsoft fell out of favor while Apple kept going up and up,” Silverblatt said. “Now Microsoft has reinvented itself, and gone up, too. ”

Both companies were hitting their stride last summer, key motors in the technology boom that has helped power the bull market.

Apple shares peaked in August at around $232, making the Cupertino, Calif., firm the first $1 trillion publicly traded U.S. company. Its value peaked at $1.12 trillion.

AD

It’s been rocky since, with shares declining 20 percent in the past six weeks even though Apple had sales of $62.9 billion in the last quarter.

“We thought the stock was overvalued because expectations for future iPhone growth were too aggressive,” said analyst Abhinav Davuluri of Morningstar Research.

AD

The latest iPhone, which started selling around mid-September, has been less robust. At the same time, analysts have pieced together a picture of Apple iPhone sales that show slightly weakening demand.

“There was a lot of momentum about pushing on the stock above $1 trillion,” Davuluri said. “Any small crack in the armor can lead to a sell-off and it did.”

Apple added to the mystery in a Nov. 1 earnings call when it announced it would no longer disclose how many products, including iPhones, iPads and Mac laptops and desktops, it was selling.

AD

“We were disappointed in that the decision not to report units obscured the mechanics of the growth trajectory of the iPhone,” Davuluri said. He sees Apple stock hitting $200, which is around 15 percent above its $174 closing price Tuesday.

Microsoft has taken off under Nadella, its share price more than tripling to a peak of $115 in October before dropping under the recent slide in technology shares.

“The company struggled under Steve Ballmer,” said Ivan Feinseth, chief investment officer at Tigress Financial Partners. “Ballmer lacked the vision and the ability to execute the way Satya Nadella has.”

One business that Microsoft stuck with through lean years is its Xbox gaming business, which many thought Nadella would spin off.

Xbox now contributes $10 billion a year to Microsoft sales. That’s a powerful stand-alone business almost anywhere, but a rounding error in Seattle.