The Justice Department is preparing to file a civil lawsuit against the ratings agency Standard & Poor’s centered on the company’s alleged misgrading of complex financial products at the heart of the financial crisis, according to an announcement yesterday.

The country’s ratings agencies have been blamed for playing a major role in causing Wall Street’s meltdown four years ago. The Justice Department’s lawsuit would mark the first enforcement action against one of the country’s biggest ratings firms – after years of concern that the government has not pursued such cases aggressively enough.

Many observers, including the Financial Crisis Inquiry Commission, have criticized the agencies for giving top-notch ratings to financial products that were in fact dependent on shoddy mortgages. When the housing bubble burst and homeowners began defaulting on their loans, the products became worthless, setting in motion a crisis on Wall Street and then in the broader economy.

The Justice Department declined to comment on the news, which was first reported by the Wall Street Journal yesterday afternoon.

S&P, which is owned by McGraw-Hill, said in a statement that the government’s case was “without factual or legal merit.”

“It would disregard the central facts that S&P reviewed the same subprime mortgage data as the rest of the market,” the statement said. S&P’s response appeared to outline the company’s central defense: that it wasn’t the only ratings agency missing the picture and that it actually downgraded a number of securities ahead of the crisis. For instance, the company said it downgraded 400 securities tied to residential mortgages as early as 2006, “more than in any prior year in history.”

“S&P deeply regrets that our (collateralized debt obligations) ratings failed to fully anticipate the rapidly deteriorating conditions in the U.S. mortgage market during that tumultuous time,” said the statement. “However, we did take extensive ratings actions in 2007 – ahead of other(s).”

Critics have said ratings agencies like S&P and Moody’s had a conflict of interest because the more products they rated, the more money they made, which may have encouraged them to be lax in their evaluations. The FCIC concluded in 2011 that the financial crisis “could not have happened without the ratings agencies.”

“With 20/20 hindsight, (S&P’s ratings downgrades) proved insufficient,” S&P said in its statement, “but they demonstrate that DOJ would be wrong in contending that S&P ratings were motivated by commercial consideration and not issued in good faith.”