DETROIT – A key ratings agency has restored General Motors’ debt to investment grade status, eight years after the company lost the rating as it spiraled toward bankruptcy protection.

The upgrade came Monday morning, shortly after GM announced plans to buy back high-interest preferred stock from a union retiree health care trust fund for $3.2 billion.

Moody’s Investors Service raised GM’s corporate debt from Ba1, which is junk status, to Baa3, the lowest investment grade rating. Two other ratings agencies, Fitch and Standard & Poors, still have GM at junk status. The upgrade likely means GM will get lower interest rates when it borrows money in the future.

GM shares rose 11 cents after the news to $36.94, a little less than a dollar short of the stock’s one-year high. The stock is up 28 percent so far this year.

Earlier Monday, the company announced that it would buy back 120 million preferred shares from a United Auto Workers retiree health care trust for $27 per share.

GM will finance the buyback through the sale of senior unsecured notes with five-, 10- or 30-year terms. The debt offering is expected to take place on or before Sept. 30.

The health care trust currently holds 260 million GM preferred shares, while the Canadian government has 16 million.

The company can buy back the shares for $25 each at the end of next year. It negotiated with the trust to buy some of the shares early, at a $2 premium.

The trust got the shares after GM emerged from bankruptcy to help pay the company’s retiree health care costs.