NEW YORK — Standard & Poor’s agreed on Wednesday to pay the U.S. government and two states more than $77 million to settle charges tied to its ratings of mortgage-backed securities.

In its first enforcement action against a major rating agency, the Securities and Exchange Commission accused S&P of fraudulent misconduct, saying the company loosened standards to drum up business in recent years. The agreement requires S&P to pay more than $58 million to the Securities and Exchange Commission, $12 million to New York and $7 million to Massachusetts.

“These settlements involve findings of intentional fraud in 2011 and 2012, well after the financial crisis,” said Andrew Ceresney, director of the SEC’s enforcement division, on a call with reporters.

S&P said in a statement that it did not admit or deny any of the charges.

It’s likely the first in a line of settlements between S&P and government agencies.

As part of its agreement with the SEC, Standard & Poor’s Ratings Services, a division of McGraw Hill Financial, will take a “time out” from rating certain types of mortgage-backed securities for a year.