Hours after posting its best quarter since 2004, General Motors on Thursday surprised the auto industry by announcing the resignation of CEO Ed Whitacre, who will be replaced by board member Dan Akerson.

During a conference call with reporters, Whitacre said he will step down as CEO on Sept. 1, but will remain chairman until the end of the year. Whitacre, a former chairman and CEO of AT&T (NYSE:T), said he will be replaced by Akerson, a managing director at buyout firm Carlyle Group. Whitacre said he is confident Akerson will "do a great job" and that he has the full support of the board. 

"We still have important work ahead of us but I am confident that we are building the foundation for GM's long-term success," Ackerson said. 

While he has logged countless years in the front-office of major companies, Akerson, like Whitacre, has no previous experience in the auto industry. GM didn't directly address questions about Akerson's experience during its conference call. 

The move surprised some industry insiders who expected GM to tap former Microsoft (NYSE:MSFT) exec Christopher Liddell, who currently serves as the auto maker's chief financial officer. If the auto maker wanted to stay in-house and go with an auto industry veteran, it could have looked to Stephen Girsky, its vice chairman of corporate strategy and business development, who has 25 years of auto experience. 

“It’s always an interesting balancing act in the auto industry. You have to have the industry knowledge, but it’s also helpful to bring in managerial experience from outside the industry,” Paul Ballew, the chief economist at Nationwide and a former GM executive director, told FOX Business. “The GM job is a complex job. This is a global corporation that has lots of things underway, even post-bankruptcy, that it is still wrestling with. So it’s a challenging job.”

Before joining GM's board in July 2009, Akerson served as chairman and CEO of XO Communications from 1999 until 2003 and chairman of Nextel Communications from 1996 until 2001. In addition to his role at GM, Akerson is a managing director and head of global buyouts at The Carlyle Group and also serves as a director at the board of American Express (NYSE:AXP).

Whitacre has helped lead GM’s recovery from its government-assisted bankruptcy. After losing nearly $13 billion a year ago, GM has posted back-to-back quarterly profits for the first time in six years and is preparing for an initial public offering. According to The Wall Street Journal, GM is set to file papers for its IPO on Friday and eventually go public later this year.

"This is something the board and I have been contemplating literally since I joined GM," Whitacre said. "At this state of my career, it was obvious that I was not going to be at GM for the long haul. My goal in coming to General Motors was to restore profitability, build a strong market position, and prepare this iconic company for success. Today, we are clearly on that path. We have put a strong foundation in place, so I am very comfortable with my timing."

Whitacre took over on Dec. 1, 2009 for Frederic “Fritz” Henderson, who helped guide GM through the bankruptcy process. Henderson became CEO after the White House fired longtime CEO Rick Wagoner. The U.S. said it did not have a hand in this change at the top.

"Today's management changes were commercial decisions made by the General Motors board of directors and as such did not require any government approval," said Mark Paustenbach, a Treasury Department spokesperson. "We are very grateful to Ed Whitacre, whose invaluable leadership and vision have helped position General Motors for a successful return to long-term viability and helped protect the taxpayers' considerable investment in the company. Dan Akerson is proven and well-respected with a depth of experience as a CEO in a wide range of major companies. We remain focused on protecting the taxpayers' interest and exiting our investment as soon as practicable." 

Whitacre has been credited with slimming down the overly-complex decision-making structure at GM, while largely keeping its auto-related talent in place. 

“He really went after the cumbersome bureaucracy and I think succeeded in dramatically fixing that," said David Cole, chairman of the Center for Automotive Research. “I think the turnaround is in very good shape. I think he can leave with a feeling that things are heading in a good direction very quickly.”

What has emerged is a leaner auto maker with just four core brands and profitability, despite the sluggish economy and historically-weak sales. 

Before joining GM, Whitacre served as chairman and CEO of AT&T from 1990 until 2007. He also served as a director on the boards of ExxonMobil (NYSE:XOM) and the PGA Tour.