DETROIT -- In a signal moment for the turnaround of the American auto industry, General Motors is edging toward a public stock sale, and its profits are now solid enough that the company's demanding chief executive officer will step aside, saying his work is done.

GM said Thursday that it made $1.3 billion from April through June, its second consecutive quarter in the black and a complete reversal from last year, when it was forced into bankruptcy and the U.S. government took a majority stake.

CEO Ed Whitacre said he would leave his post Sept. 1. He said the GM board knew all along that he would do so after the company returned to health, and industry analysts said it was an important step leading up to the stock sale.

Whitacre, who will stay on as chairman through the end of this year, will be replaced as CEO by Daniel Akerson, 61, a former telecommunications executive who sits on the GM board.

While executives would not discuss the stock sale Thursday, GM is expected to file its initial paperwork with federal regulators today.

"Things look good. There's a foundation in place, a good foundation," said Whitacre, who was drafted out of his first retirement by the government to fix the troubled company. "I believe we've accomplished what we set out to do."

Last year GM lost nearly $13 billion in the second quarter alone. In the first six months of this year, GM made $2.2 billion as cost cuts took full effect, sales in China grew and people paid more for GM's revamped vehicles in the United States.

For example, GM's crossovers, which are similar to sport utility vehicles but built on passenger-car undercarriages, are fetching $3,000 more this year than last.

Crossovers such as the Chevrolet Equinox and Buick Enclave have sold well, and the company has high hopes later this year for the Chevy Cruze, a compact, and the Volt, a $41,000 rechargeable electric car.

The federal government received a 61 percent stake in GM in exchange for $43 billion in aid to keep it alive. It could sell some or all of that when GM makes its public stock offering, perhaps as early as November.

GM first must reveal to the Securities and Exchange Commission how many shares it intends to sell on the open market and at what price. The government would then tell GM how much of its stake it will want to sell, and GM would disclose that in another filing.

If GM's shares sell for too little, the government and other stakeholders are less likely to get their money back and GM is less likely to raise money to pay off debt.

The environment for new stock offerings is less than welcoming. Six initial public offerings have been postponed since June 1, in part out of fear that they wouldn't fetch a high enough share price, said Matt Therian, an analyst with Renaissance Capital, a Greenwich, Conn., firm specializing in public stock offering research.

But GM may have enough cache to overcome the sluggish economy, Therian said.

"The IPO market can be a case-by-case basis," he said. "I think in many ways GM is going to be a unique story."

GM still faces problems. Its U.S. sales rose 14 percent in the first six months of this year, trailing the average industry increase of 17 percent. It also spends more on car-buyer incentives than any other automaker.

Some background information on GM's incoming CEO, Daniel F. Akerson.

AGE: 61

EDUCATION: Bachelor's degree in engineering from the U.S. Naval Academy; master's degree in economics from the London School of Economics.

PERSONAL: Married with three children.

PROFESSIONAL EXPERIENCE: He joined the automaker's board of directors in July 2009. He is a managing director and head of global buyout at The Carlyle Group, a private equity firm in Washington, D.C., which he joined in 2003.

From late 1999 to 2003, he was chairman and CEO of XO Communications. He was chairman of Nextel Communications from 1996 to 2001 and was CEO from 1996 to 1999.

He was CEO of General Instrument Co. from 1993 to 1995. Between 1983 and 1993 he held several roles at MCI Communications, including executive vice president, president, chief financial officer and chief operating officer.

Akerson served in the Navy from 1970 to 1975.

Associated Press