Photo

The government bailout of General Motors ended on Monday with the Treasury Department’s announcement that it had sold its final shares of G.M. stock.

The sale closes a tumultuous chapter in the history of the American auto industry, and allows the nation’s largest automaker to continue its comeback free from the stigma of being known as “Government Motors.”

Treasury Secretary Jacob J. Lew said the government sold the last of what was once a 60 percent stake in G.M. Taxpayers lost about $10 billion on their $49.5 billion investment in the Detroit automaker. “With the final sale of G.M. stock, this important chapter in our nation’s history is now closed,” Mr. Lew said. In all, taxpayers have ended up in the black on the crisis-related bailouts, Treasury officials said. It has recovered $433 billion from the Troubled Asset Relief Program after initially investing about $422 billion.

The announcement of the sale brought a collective sigh of relief from G.M. officials, who have struggled to win back consumers who were loath to buy a vehicle from an automaker under the yoke of government ownership.

“It’s been a long, hard road with the label of Government Motors,” Mark L. Reuss, the president of G.M.’s North American division, said before the announcement.

It was five years ago that President George W. Bush decided to make emergency loans to prevent the financial collapse of G.M. and Chrysler, the smallest of the Detroit carmakers.

Then, in 2009, President Obama undertook a sweeping effort to save the beleaguered car companies by appointing a task force to lead G.M. and Chrysler through bankruptcy.

Over all, the government spent more than $80 billion to save G.M., Chrysler and their suppliers. The third Detroit automaker, Ford Motor, survived the recession without direct financial aid from Washington.

On Monday, Mr. Obama described the bailout as a calculated bet on the domestic auto industry’s ability to recover and become competitive again.

“When things looked darkest for our most iconic industry, we bet on what was true: the ingenuity and resilience of the proud, hardworking men and women who make this country strong,” the president said in a statement.

G.M. became a public company again in 2010 when it made what at the time was the largest initial public stock offering.

But the company’s turnaround has been challenging and at times painful.

As part of his rescue plan in 2009, Mr. Obama required that G.M.’s chief executive, Rick Wagoner, resign.

And the president’s auto task force required other wrenching changes on the company, including eliminating divisions like Pontiac and Saturn, cutting dealers and employees, and demanding that G.M. overhaul its insulated corporate culture.

Automotive specialists said the aggressive intervention by President Bush and President Obama was necessary to prevent a total breakdown of the industry — one of the largest manufacturing sectors in the American economy.

“It had to be done because the entire industry was in a depression, and it could have dragged the whole country into one,” said David E. Cole, the former chairman of the Center for Automotive Research in Ann Arbor, Mich.

A report released recently by Mr. Cole’s organization estimated that the government’s auto bailout helped save 1.2 million jobs in the United States, including employment by suppliers and dealers.

The healthy state of the industry today is in contrast to when it began its free fall five years ago.

G.M. had been losing billions of dollars for years because of unprofitable products, an excess of production capacity, and the spiraling costs of pensions and health care for hundreds of thousands of retirees and relatives.

When auto sales plunged in summer 2008 because of the Wall Street crisis and a shortage of available credit, G.M.’s losses widened. And during congressional hearings that fall on the industry’s troubles, Mr. Wagoner said that G.M. could become insolvent by the end of the year without an emergency infusion of taxpayer dollars.

For several tense months, the fate of G.M. — once considered the pinnacle of American industrial prowess — hung in the balance.

But in March 2009, President Obama announced a government effort to save G.M., and a plan to steer Chrysler into a partnership with the Italian automaker Fiat.

G.M. and Chrysler were required to file for Chapter 11 bankruptcy. In the process, the companies shed jobs, factories and liabilities, and emerged as leaner, more focused manufacturers.

The task force also required G.M. to replace several members of its board with a new cast of outside directors — one of whom, Daniel Akerson, is now the company’s chairman and chief executive.

Because of G.M.’s precarious position, the government took stock in the company in exchange for its financial aid. Since the initial public offering in 2010, the Treasury Department has methodically sold its shares, culminating in Monday’s final sale, of about 2 percent of the company.

“We will always be grateful for the second chance extended to us, and we are doing our best to make the most of it,” Mr. Akerson said in a statement.

Mr. Reuss, the North American chief, met with reporters on Monday to introduce one of G.M.’s latest initiatives, a “customer engagement” call center in suburban Detroit.

The center is part of G.M.’s efforts to build closer ties to vehicle owners and engender more loyalty for its products. In the past, the company has been criticized for not adequately reaching out and helping consumers with vehicle problems.

“There was a time when we wouldn’t admit that we fell short,” said Alicia Boler-Davis, G.M.’s senior vice president for global customer experience and quality. “Now it’s part of the new G.M. culture.”

The post-bailout G.M. is smaller, but more competitive with rivals like Ford and Toyota. The company has posted 15 consecutive profitable quarters and has reported particularly strong earnings in the surging North American market.

But more work is ahead for G.M. to match the profit margins of Ford in North America, and to stem its chronic losses in Europe. G.M. also has to build on the successes of its revamped product lineup in the all-important United States market.

The company has introduced a number of competitive small cars, as well as new versions of its bellwether trucks and sport utility vehicles.

Its United States market share, however, is still stuck at slightly less than 18 percent, the same as it was a year ago.

But Mr. Reuss, a longtime executive whose father was once the president of G.M., pledged that sales would improve because of better products and a new spirit in the company.

“We’re getting a winning culture in place,” he said. “If we quit changing or you don’t see us changing, I’d be worried about that.”

Bill Vlasic reported from Detroit, and Annie Lowrey from Washington.