It used to be that Microsoft was the evil empire, and Apple the scrappy underdog.
Now the roles are reversed, and Microsoft is challenging a dominant Apple, which has staked its claim as the leader of the sizzling mobile sector for tablets and smartphones, as well as the biggest seller of digital music.
Microsoft, still the biggest force in the PC market with its Windows operating system, is making a new, belated effort on Apple's turf.
The Redmond, Washington-based giant has launched its own branded Surface tablet with prices and specifications similar to those of the iPad, and a new Windows 8 operating system designed for tablets.
Microsoft also is making an aggressive push in mobile phones with its Windows Phone 8 platform being used by Nokia, Samsung, HTC and others.
And it has created its own music service as an alternative to Apple's iTunes, with 30 million songs and additional features offered by Internet radio operators.
"Microsoft is the challenger now, and it is taking a lot of pages from Apple's playbook," said Roger Kay, an analyst and consultant with Endpoint Technologies Associates.
Kay said Microsoft is learning from Apple about the advantages of "having control of the integrated stack," meaning software and hardware, along with other services to keep users within the company's ecosystem.
But he said Microsoft has "constraints" because its updates must remain compatible with older devices, making the task more complex.
"Microsoft can write software which is as good as Apple's but it has to be free of the constraints," Kay said.
"Apple can and has said to customers, 'Throw out all your old devices, because we have new ones.' Microsoft has been at a disadvantage."
He said Microsoft has the potential for a fresh start with the new tablet, which integrates, hardware and software called Windows RT in a new product.
But the tech landscape is far different than in previous Microsoft-Apple clashes. Amazon claims some 22% of the tablet market, and Google and its partners using the Android system are a major force in mobile.
But Microsoft appears to be digging in for the long-haul by getting into tablets, the mobile market and music.
Kash Rangan, analyst at Bank of America/Merrill Lynch, said Microsoft appropriately priced the new tablet starting at $499, the same as the entry-level iPad. This will avoid "cannibalization" of products which impact the Windows franchise.
And because Microsoft will include its Office software in the tablets, they "appear less pricey to users relative to iPads," said the analyst, who expects about 5.2 million of the Microsoft devices to be sold over the coming year.
In music, Microsoft is making a new offensive with its Xbox music service more than a year after it pulled the plug on its Zune digital media player, a would-be rival to Apple's iPod.
However some analysts said the new service might fare better.
"The service takes aim at a fractured digital music landscape (where) consumers have to use multiple services such as iTunes, Pandora and Spotify today and do not have one simple destination that allows them to do everything," said Richard Greenfield at BTIG Research.
With the various initiatives, Microsoft is seeking to build an "ecosystem" like Apple, which can deliver the devices and services to remain connected to consumers.
"People are looking to buy a complete package, that's what they buy when they go to Apple," said Jack Gold, analyst with J. Gold Associates.
Frank Gillett at Forrester Research said that while Microsoft is used on some 95% of PCs, its share of all "personal devices" -- which include PCs, smartphones, and tablets -- is only around 30%.
The new initiatives "will simply stop the shrinking, maintaining Microsoft's share at about 30%," he said.
"By 2016, we believe that Microsoft will have about 27% of tablet unit sales, but only about 14% of smartphone sales -- and some of us are very skeptical they'll even get to 14%."
Gold said while Microsoft may not be able to dominate in tablets or phones, its strategy appears to "kickstart" the market to keep the Windows platform relevant.
"You never want to sell Microsoft short," Gold said.
"They have a lot of resources and they're not a company that gives up. They are applying significant amounts of resources to transition the company to address the new market realities. And they've reinvented themselves several times already."