* Standard & Poor's, Moody's and Fitch sued

* Lawsuit alleges agencies caused $457 million losses

* Moody's, S&P reject allegations; Fitch has no comment

* Moody's shares down 2 pct, McGraw-Hill shares down 3 pct (Adds Moody's and S&P comments, CalPERS case, stock prices)

By Jonathan Stempel and Steve Eder

NEW YORK, Nov 20 (Reuters) - The three largest credit rating agencies were sued on Friday by Ohio, which said their pursuit of profit and ties to Wall Street resulted in inflated ratings on toxic mortgage debt that cost state pension funds hundreds of millions of dollars.

Attorney General Richard Cordray filed the lawsuit against Standard & Poor's, Moody's Investors Service and Fitch Ratings on behalf of five pension funds that say they lost more than $457 million because the agencies gave false and misleading, often "triple-A" ratings to securities they knew were risky.

"The credit rating agencies sold out, and they sold us out," Cordray told reporters. "They traded in their objectivity, and in exchange received massive profits."

S&P is owned by McGraw-Hill Cos MHP.N , Moody's by Moody's Corp MCO.N and Fitch by France's Fimalac SA LBCP.PA .

Friday's lawsuit in federal court in Columbus, Ohio, was filed four months after the nation's largest pension fund, the California Public Employees' Retirement System, sued the agencies over ratings they said caused $1 billion of losses.

California Attorney General Jerry Brown subpoenaed the agencies in September as he examined whether they violated state law. Cordray accused the agencies of breaking Ohio law, and said he does not plan to start a class action.

The Obama administration, Congress and regulators are weighing financial industry reforms that could tighten ratings oversight and limit perceived conflicts of interest.

Rating agencies have in lawsuits rejected allegations of wrongdoing, including fraud, and said their ratings constitute opinion protected under the U.S. Constitution.

S&P spokesman Steven Weiss and Moody's spokesman Michael Adler said Ohio's claims lack merit, and Adler added that Cordray "appears to be seeking new scapegoats for investment losses incurred during the unprecedented market disruption."

Fitch Managing Director Kevin Duignan declined to comment, saying Fitch had not received the complaint.

New York Attorney General Andrew Cuomo ended a probe of rating agencies last year with a pact that changed how fees are charged to review mortgage-backed securities.

COWS

Friday's 77-page lawsuit recounted many alleged instances where agencies either appeared unconcerned about ratings' accuracy or else hungered for more business.

It included a widely quoted comment by an S&P analyst in 2007: "It could be structured by cows and we would rate it."

Cordray, like many critics, said the "issuer-pays" model where debt issuers pay agencies for ratings creates a conflict of interest that could lead to inflated ratings.

In a closely watched New York case in which the leading First Amendment lawyer Floyd Abrams is defending S&P, U.S. District Judge Shira Scheindlin in September said ratings might not deserve the broadest First Amendment protection when they are distributed to a "select group of investors."

She also said rating opinions could be challenged "if the speaker does not genuinely and reasonably believe it or if it is without basis in fact."

Cordray suggested the agencies' close ties to Wall Street negates any First Amendment defense. "We do think that they went well beyond offering dispassionate, neutral opinions, where the First Amendment would have more traction," he said.

Ohio sued on behalf of the Ohio Public Employees Retirement System, the State Teachers Retirement System of Ohio, the Ohio Police & Fire Pension Fund, the School Employees Retirement System of Ohio and the Ohio Public Employees Deferred Compensation Program.

In afternoon trading on the New York Stock Exchange, Moody's shares were down 47 cents, or 2 percent, at $22.72, while McGraw-Hill was down 93 cents or 2.9 percent at $30.80.