NEW YORK (AP) -- Standard & Poor's says the government plans to file a lawsuit alleging wrongdoing by the agency when it gave high ratings to mortgage-backed securities that later plunged in value and fueled the 2008 financial crisis.

S&P said Monday that it has been told by the Department of Justice that it intends to file a civil lawsuit focusing on S&P's ratings on some mortgage-backed securities in 2007.

The ratings agency denies any wrongdoing and says any lawsuit would be without factual or legal merit.

There was no immediate comment from the Justice Department.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.