(Reuters) - A U.S. judge has allowed the California attorney general’s office to proceed with a lawsuit accusing Standard & Poor’s of misleading investors by inflating its credit ratings that led to investment losses, rejecting the rating agency’s effort to dismiss the case, a court filing showed.

A view shows the Standard & Poor's building in New York's financial district February 5, 2013. REUTERS/Brendan McDermid

The ruling is the latest legal reversal for S&P, which is facing multiple lawsuits filed by the U.S. government and several states over its role in assigning credit ratings to various mortgage securities that tanked during the financial crisis five years ago.

In the lawsuit, California Attorney General Kamala Harris said S&P intentionally inflated its ratings for many residential mortgage-backed securities.

The lawsuit also alleges that the California Public Employees’ Retirement System (Calpers) and the California State Teachers’ Retirement System (Calstrs) lost nearly $600 million after investing in those securities by partly relying on S&P’s ratings.

The lawsuit invokes California’s False Claims Act that punishes anyone who knowingly presents a false or fraudulent claim.

S&P, a unit of McGraw Hill Financial Inc MHFI.N, said that it was not the seller of those securities and the attorney general's office cannot apply the False Claims Act to the case because Calpers and Calstrs did not buy those securities using "state funds."

In a written decision on Wednesday, Judge Curtis Karnow of Superior Court of California disagreed with S&P’s assertion.

“S&P has not convinced me that, as a matter of law, the lost money in this case did not constitute a potential or actual injury to the public treasury,” Karnow said.

Nick Pacilio, a spokesman for the California attorney general’s office, told Reuters that a case management conference at the court is scheduled for September 6.

S&P officials could not be reached for comment by Reuters outside of regular U.S. business hours.

In July, a federal judge rejected S&P’s effort to dismiss a civil fraud case, allowing the U.S. government to proceed with $5 billion lawsuit accusing the ratings agency of misleading investors by inflating its credit ratings.

S&P has said statements about the integrity of its ratings are “puffery” that cannot be a basis for the fraud lawsuit, filed on February 4 by the U.S. Department of Justice.

Separately, S&P is facing similar cases by 15 U.S. states and the District of Columbia in the U.S. District Court in Manhattan, where the state lawsuits are now being handled.

U.S. District Judge Jesse Furman in Manhattan has scheduled an October 4 hearing over the states’ effort to move their lawsuits back to various state courts and S&P’s efforts to dismiss the states’ litigation altogether.

The case in California is in re People of the State of California vs. The McGraw-Hill Companies et al, Case No. CGC-13-528491, Superior Court of California, County of San Francisco.