SAN FRANCISCO (AP) — California's attorney general on Tuesday joined the U.S. Department of Justice and several other states in seeking billions of dollars in damages from the debt rating agency Standard & Poor's for its alleged role in the mortgage crisis.

Attorney General Kamala Harris alleged in a lawsuit filed in San Francisco Superior Court that S&P lured the state's public pension funds, ordinary Californians and others to invest in catastrophically bad mortgage-backed securities with unjustly inflated ratings.

The state's civil charges mirror the allegations the U.S. Department of Justice made in a federal lawsuit filed late Monday in Los Angeles, accusing the company of fraud for giving high ratings to risky mortgage bonds that helped bring about the financial crisis.

U.S. Attorney General Eric Holder announced the federal lawsuit Tuesday at a Washington, D.C., news conference.

The California attorney general joined Holder and other high-ranking Justice Department officials at the news conference along with attorneys general from Connecticut, Delaware, the District of Columbia, Illinois, Iowa and Mississippi who have filed or will file separate, similar civil fraud lawsuits against S&P. More states are expected to sue, the Justice Department said.

In particular, the California lawsuit alleges that the rating company's actions led directly to a combined $1 billion loss for the California Public Employees Retirement System and the California State Teachers Retirement System.

From 2004 to 2007, S&P systematically misrepresented to the public and the state's public pension funds that its ratings of structured finance securities were based on an independent, objective and reliable analysis, and not influenced by its economic interests, the complaint alleges.

In turn, the California attorney general's lawsuit said investors relied on the rating agency to serve as a neutral adviser with its ratings.

"In reality, S&P corrupted its ratings process to curry favor with large banks, which paid S&P billions of dollars in return," the lawsuit states. "In other words, S&P claimed to be a gatekeeper, but it acted like a toll collector."

Harris said California law allows the state to triple any damages a San Francisco jury may award if her case goes to trial.

S&P, a unit of New York-based McGraw-Hill Cos., has denied wrongdoing and called the lawsuits "meritless."

The company said in a lengthy and defiant statement Tuesday that it intended to "vigorously defend S&P against these unwarranted claims" and argued that the ratings in question were based on "good-faith opinions of professionals."

"At all times, our ratings reflected our current best judgments," the company said. "Unfortunately, S&P, like everyone else, did not predict the speed and severity of the coming crisis and how credit quality would ultimately be affected."

The California Public Employees Retirement System, or CalPERS, already has a pending lawsuit against S&P and its rival Moody's Investors Service in San Francisco Superior Court. The retirement fund filed its lawsuit in 2009 making similar allegations contained in the government lawsuits filed Tuesday.

In December, San Francisco Superior Court Judge Richard Kramer rejected Moody's and S&P's bids to toss out the case on free speech grounds. The company argued they were espousing good-faith opinions on the investment vehicles that ultimately failed.

Kramer wrote that CalPERS presented "sufficient evidence" that the agencies had issued ratings "without reasonable grounds to believe that the representations were true."

The agencies have appealed that ruling.

More than 1 million California homes were foreclosed between 2008 and 2011 and another 570,000 are in danger of being lost to foreclosure, according to a California Senate report.