General Motors on Tuesday promoted insider Mary Barra to serve as the new chief executive officer, the first female head of a major U.S. automaker.

Barra, an executive vice president and 33-year GM veteran, will succeed current CEO Dan Akerson on January 15, the company said.

Akerson, 65, is retiring several months earlier than planned because his wife has an advanced stage of cancer, the automaker said.

The announcement comes at an important time for General Motors -- one day after the U.S. Treasury Department said it had sold its final financial stake in the company, closing the book on its 2009 taxpayer bailout of the auto industry.

GM (GM) shares are up more than 40% so far this year. The company has earned nearly $20 billion in net income since 2010, the year it returned to profitability after emerging from bankruptcy.

Also, J.D. Power gave top ranks to GM in quality this year for the first time, in its annual auto survey.

In addition to selecting Barra, the board of directors on Tuesday named Theodore "Tim" Solso to succeed Akerson as chairman.

Akerson became CEO in September 2010, and Barra will become GM's fifth CEO in less than five years.

Related: Manufacturing: Not just a man's job

Since August, Barra has served as executive vice president of global product development and global purchasing and supply chain, according to her company bio.

For more than two years before that, she was an executive VP focusing on international design, engineering, program management and quality. Earlier, she was vice president of global human resources. Barra started at GM when she was 18 as part of a cooperative education program.

She was paid $4.9 million in total compensation last year, according to corporate documents. That includes a salary of $750,000.

As the incoming CEO of a Fortune 500 company, Barra joins the ranks of 21 other female chief executives including Indra Nooyi of PepsiCo (PEP), Marillyn Hewson of Lockheed Martin (LMT), Meg Whitman of Hewlett-Packard (HPQ), Virginia Rometty of IBM (IBM) and Phebe Novakovic of General Dynamics (GD).

Related video: 90 seconds with GM's next CEO

Women represent a minority presence in the auto industry, comprising 21% of the total workforce. According to federal data, 39,000 of the industry's 185,200 employees were women. And women hold about 3.3 million of 12 million jobs in the broader manufacturing sector, or about 27%.

Jared Rowe, president of auto product researcher Kelley Blue Book, said that it's smart for an automaker to put a woman in charge with a background in product development, considering that "the bulk of the buying decisions are actually made by women, when it comes to purchasing vehicles."

He also said that Barra's long history with GM is vital to the company's leadership.

Related: Treasury sells its last stake with GM

"GM is in a bit of a golden age in terms of their product overall," he said. "I think it's very good she's an insider because she's been part of the evolution of GM. She's been part of the transformation and she can continue that, which I think is phenomenal."

GM began its rapid turnover of top leadership in March of 2009, when long-time CEO Rick Wagoner exited as one of the conditions of the federal bailout. Then came Fritz Henderson, Ed Whitacre, Akerson and now Barra.

--CNN's Amanda Hobor, and CNNMoney's Chris Isidore and Annalyn Kurtz contributed to this article.