Media playback is unsupported on your device Media caption GM will no longer be known as 'Government Motors' says specialist Jeff Bennett

The US government has sold its remaining shares in General Motors, leaving it with a loss of around $10bn (£6bn) on the bailout of the car maker.

The US Treasury spent $49.5bn bailing out GM in 2008 and 2009, and took a 61% stake in the car maker.

Treasury Secretary Jack Lew said the move prevented the collapse of the US auto industry and saved a million jobs.

"With the final sale of GM stock, this important chapter in our nation's history is now closed," he said.

We will always be grateful for the second chance extended to us Dan Akerson, General Motors

GM filed for bankruptcy protection in June 2009, making it the biggest failure of an industrial company in US history.

The reorganisation saw it slash 13 car plants and 27,000 employees in the US.

Since emerging from bankruptcy, GM has reported 15 profitable quarters, has almost $27bn in cash and is considering rewarding shareholders with a dividend payment.

The government began selling its shares in GM in November 2010 and last month said it expected to sell its remaining shares by the end of the year.

One million jobs

The rescue of the US auto industry began under the administration of former US President George W Bush in 2008.

President Barack Obama expanded the effort and took control of GM and rival, Chrysler. Canadian authorities also took part in the rescue.

Treasury Secretary Lew said today that President Obama had "understood that inaction could have cost the broader economy more than one million jobs, billions in lost personal savings, and significantly reduced economic production."

In a statement, GM's chief executive, Dan Akerson, expressed gratitude for the government's help.

"We will always be grateful for the second chance extended to us and we are doing our best to make the most of it," he said.