In a surprise statement this morning, Microsoft announced that CEO Steve Ballmer has decided to retire “within 12 months.”

Ballmer will continue as CEO for as long as it takes to choose his successor, and he is to “lead Microsoft through the next steps of its transformation to a devices and services company that empowers people for the activities they value most.”

“There is never a perfect time for this type of transition, but now is the right time,” Ballmer said. “We have embarked on a new strategy with a new organization, and we have an amazing Senior Leadership Team. 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.”

A special committee appointed by the board of directors is spearheading the search, chaired by the board’s lead independent director, John Thompson. The committee also includes Chairman of the Board Bill Gates, Chairman of the Audit Committee Chuck Noski, and Chairman of the Compensation Committee Steve Luczo. They’re also working with recruiting firm Heidrick & Struggles International, 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,” Gates said. “We’re fortunate to have Steve in his role until the new CEO assumes these duties.”

Ballmer revealed his plans to Microsoft staff in an internal e-mail, writing proudly of the company’s achievements during his time at Microsoft and at the helm, explaining the emotional decision he’s chosen to make.

“Microsoft is an amazing place,” he wrote. “I love this company. I love the way we helped invent and popularize computing and the PC. I love the bigness and boldness of our bets. I love our people and their talent and our willingness to accept and embrace their range of capabilities, including their quirks. I love the way we embrace and work with other companies to change the world and succeed together.”

Ballmer joined Microsoft in 1980 and was the company’s first business manager. Before becoming CEO in 2000, his roles included senior vice president of sales and support, senior vice president of systems software, and vice president of marketing. During his time at the company, Microsoft grew from US$7.5 million to $78 billion in revenue, and from just over 30 employees to almost 100,000.

“Microsoft has all its best days ahead,” Ballmer wrote. “Know you are part of the best team in the industry and have the right technology assets. We cannot and will not miss a beat in these transitions. I am focused and driving hard and know I can count on all of you to do the same. Let’s do ourselves proud.”