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.