NEW YORK (AP) -- Moody's (MCO -0.64%) Investors Service on Friday downgraded McGraw-Hill (SPGI -0.39%), citing the company's plans to sell its education business and the lawsuit filed by the Department of Justice against its Standard & Poor's credit rating agency.

Moody's lowered McGraw-Hill's senior unsecured rating to "Baa2" from "A3." Both ratings are considered to be "medium grade," but Baa-rated investments are considered by Moody's to have some speculative elements. The outlook is negative.

The move came a little more than a week after Fitch Ratings, another rival credit rating agency, also downgraded McGraw-Hill and put its ratings under review for additional downgrades, pointing to the lawsuit.

Moody's said that McGraw-Hill will lose significant profit and business diversity as a result of the pending $2.5 billion sale of its education business to investment funds managed by affiliates of Apollo Global Management (APO).

Meanwhile, a bad outcome to the lawsuit could significantly affect the company's credit profile, while management's focus and the direct costs related to S&P's defense could be a drag on the company's operations for some time, Moody's said.

S&P said earlier this week that it's prepared to spend years beating back the lawsuit.

The government said in its complaint against S&P that it may seek up to $5 billion in fines and penalties -- several years' worth of profits for McGraw-Hill. The company believes the charges lack merit but said it expects the case to drag on for three or more years.

Experts have said that the lawsuit against S&P could serve as a template for future action against Fitch and Moody's. High ratings from the three agencies, particularly on mortgage-backed securities, made it possible for banks to sell trillions in risky investments. Some investors, including pension funds, can buy only securities that carry high credit ratings.

McGraw-Hill shares fell 4 cents to $44.82 in midday trading.