Microsoft chief executive Steve Ballmer announced Friday he would retire within 12 months, opening a new chapter for the industry pioneer struggling to keep pace with a fast-changing tech sector. \"There is never a perfect time for this type of transition, but now is the right time,\" Ballmer said in a statement, which surprised financial markets and sparked a rally in Microsoft shares. \"My original thoughts on timing would have had my retirement happen in the middle of our company\'s transformation to a devices and services company. We need a CEO who will be here longer term for this new direction.\" Ballmer took over as CEO in 2000 from co-founder Bill Gates, a classmate and friend from their days at Harvard University in the 1970s. When Ballmer took over, Microsoft was the undisputed tech sector leader, and the world\'s largest company in market value. But in recent years, Microsoft has struggled as consumers began to transition from desktop and laptop PCs to mobile devices. While its Windows software is used on the vast majority of personal computers, Microsoft has had little impact in the fast-growing segments of tablets and smartphones. \"Microsoft has clearly been on the wrong track for a long time,\" said Roger Kay, analyst at Endpoint Technologies Associates. \"Essentially Microsoft missed the shift to high mobility entirely.\" Kay said Microsoft \"has suffered from the inability to look honestly at itself. They say they\'re going to be the king of search, but they\'re not. They need to look at the businesses not working and turn them off.\" But Jack Gold, analyst with J. Gold Associates, argued that \"Ballmer did a lot for Microsoft while he was there, and his accomplishments should not be diminished by the troubles Microsoft has had the past couple of years.\" Still, Gold said that \"it really is time for Microsoft to chart a new course and correct some of the issues and challenges plaguing it, and Ballmer was not the right individual to do that.\" Microsoft shares leapt as much as nine percent in pre-market trade and were up 6.9 percent to $34.61 at 1717 GMT. The shares, which hit topped $58 in 1999 adjusted for stock splits during the dot-com boom, have been little changed in the past decade.Citi analyst Walter Pritchard said this was positive news for Microsoft. \"Some investors have fantasized about this event and we\'ve often heard \'the stock would be up 10 percent if Ballmer retires,\'\" Pritchard said in a note to clients, adding that the news \"likely puts everything on the table\" for Microsoft. \"A new CEO will likely have broad freedom to make changes to the business, including exiting businesses and returning more capital,\" he added. \"The most likely scenario would be to focus on enterprise (already 87 percent of company profits...) and de-invest from consumer.\" Ballmer, 57, will continue in the interim as CEO \"and will lead Microsoft through the next steps of its transformation to a devices and services company that empowers people for the activities they value most,\" said a statement from the Redmond, Washington, company. The board of directors has appointed a special committee to direct the process chaired by independent director John Thompson and including Gates, Chuck Noski and Steve Luczo. Microsoft said it is working with Heidrick & Struggles International Inc., an executive recruiting firm, and will consider both external and internal candidates. \"As a member of the succession planning committee, I\'ll work closely with the other members of the board to identify a great new CEO,\" said Gates. Some Microsoft watchers mentioned names of current or former executives as potential successors, but Citi\'s Pritchard said, \"We expect the company to focus exclusively on outside candidates, meaning that it is very difficult to predict who could be CEO and what direction they will take the company.\" Kay said, meanwhile, it is \"hugely problematic to find somebody capable of taking over Microsoft. The company is too big and ungainly and has competing goals.\" The analyst added that looking back, it might have been better to break up Microsoft when it faced a lengthy US antitrust suit for its dominance of the PC software sector. \"They might be able to do better as separate companies,\" he said.