WASHINGTON – Fallen giant General Motors Co. accelerated toward recovery Wednesday, announcing the repayment of $8.1 billion in U.S. and Canadian government loans five years ahead of schedule.

The Obama administration crowed about the “turnaround” at GM and fellow bailout recipient Chrysler LLC, saying the government’s unpopular rescue of Detroit’s automakers is paying off.

Much of the improvement comes from GM slashing its debt load and workforce as part of its bankruptcy reorganization last year. But the automaker is a long way from regaining its old blue-chip status: It’s still losing money — $3.4 billion in last year’s fourth quarter alone. And while its car and truck sales are up so far this year, that’s primarily due to lower-profit sales to car rental companies and other fleet buyers.

Chrysler, now run by Italy’s Fiat Group SpA, said Wednesday it lost almost $200 million in the first quarter. But it said it boosted its cash reserves by $1.5 billion, reducing the likelihood that it will need more government aid.

“This turnaround wasn’t an accident of history,” said White House economic adviser Larry Summers. “It was the result of considered and politically difficult decisions made by President Obama to provide GM and Chrysler — and indeed the auto industry — a lifeline, if they could demonstrate the will to reshape their businesses.”

GM CEO Ed Whitacre, a former telecommunications executive who was tapped to lead the automaker’s revival, announced the loan payback at the company’s Fairfax Assembly Plant in Kansas City, Kan. He also said GM is investing $257 million in that factory and the Detroit-Hamtramck plant in Michigan. No new jobs will be added, but workers at both plants are gaining job security because they will build the next generation of the popular midsize Chevrolet Malibu.

Whitacre said GM was rebuilding through the sale of gas-sipping midsize cars and crossovers and investing more than $1.5 billion in 20 plants since leaving bankruptcy protection, preserving 7,500 jobs.

“We’ve developed a healthy, clean balance sheet and we’ve developed a cost structure that allows us to be competitive,” Whitacre said before leaving for Washington to provide an update on GM’s progress to Treasury Secretary Timothy Geithner, House Speaker Nancy Pelosi and Michigan’s congressional delegation.

Whitacre is paying for the chartered flight from Kansas City to Washington out of his own pocket. U.S. auto executives received a scolding from Congress last year when they took private jets to Washington to seek a taxpayer-funded bailout.

Bruce Clark, senior vice president of Moody’s Investors Service, said the loan payback is one step in a longer improvement process for GM.