Virginia's highest court on Friday threw out an attempt by the state's attorney general to make the University of Virginia surrender thousands of pages' worth of e-mail messages and other documents related to the work of one of the nation's most prominent climate scientists.

With its ruling, the state Supreme Court handed a definitive defeat to the attorney general, Kenneth T. Cuccinelli, and a victory to the university and the researcher, Michael E. Mann, a former University of Virginia faculty member who is now a professor of meteorology at Pennsylvania State University.

Mr. Mann is the creator of an iconic graph that has helped demonstrate the progress of man-made climate change by showing estimates of global temperature records over the past 1,000 years. Mr. Cuccinelli is a high-profile Republican who is now running for governor and who said he wanted the documents to search for evidence of research fraud in Mr. Mann's work.

"I'm pleased that this particular episode is over," Mr. Mann said in a written statement. "It's sad, though, that so much money and resources had to be wasted on Cuccinelli's witch hunt against me and the University of Virginia when it could have been invested, for example, in measures to protect Virginia's coastline from the damaging effects of sea-level rise it is already seeing."

The university spent more than $570,000, all from private sources, defending the case over the past two years, a spokeswoman said. Its victory, however, was complete. The court made clear the state institution enjoys full exemption from the state's Fraud Against Taxpayers Act, which Mr. Cuccinelli had cited as his basis for demanding records of Mr. Mann's work.

"The University of Virginia, as an agency of the commonwealth, does not constitute a 'person' under the Fraud Against Taxpayers Act and therefore cannot be the proper subject" of a records demand, the court wrote in its opinion.

Dismissal 'With Prejudice'

It is an "important decision that will be welcomed here and in the broader higher-education community," said Teresa A. Sullivan, president of the University of Virginia, where Mr. Mann served as an assistant professor of environmental sciences from 1999 to 2005.

The decision also carries great weight for researchers, said Michael H. Halpern, head of the Scientific Integrity Program at the Union of Concerned Scientists, an advocacy group. Mr. Cuccinelli "didn't have a legal leg to stand on in his pursuit of Mann's and other scientists' private correspondence," and the university deserves praise for firmly defending that principle, Mr. Halpern said.

The seven-member court, in a majority opinion written by Justice LeRoy F. Millette Jr., said it was dismissing Mr. Cuccinelli's case "with prejudice," meaning he cannot bring any further action on the same claim. The majority, in explaining its deference to state institutions, cited "ancient" legal interpretations dating to a time when it was recognized that "the king shall not be bound unless the statute is made by express words or necessary implication to extend to him."

One justice, Elizabeth A. McClanahan, dissented from the majority's dismissal of the lawsuit with prejudice. She agreed that the University of Virginia should be exempt from the fraud statute but said that Mr. Cuccinelli should be given other opportunities to seek records that might show fraud by Mr. Mann.
Mr. Cuccinelli, in pursuing a fraud allegation, suggested that Mr. Mann might have intentionally misrepresented scientific findings in order to obtain research grants. In a statement, he said he would now move to dismiss a follow-up request for documents that is still pending in Albemarle County Circuit Court.
"From the beginning," Mr. Cuccinelli said, "we have said that we were simply trying to review documents that are unquestionably state property to determine whether or not fraud had been committed. Today, the court effectively held that state agencies do not have to provide state-owned property to state investigators looking into potential fraud involving government funds."

It's not the end of investigations aimed at Mr. Mann, who has become a lightning rod for activists seeking to challenge scientific findings about the rise in average global temperatures.

The American Tradition Institute, a think tank with roots in the oil and gas industry, has filed its own lawsuit against the university, complaining that it has failed to respond adequately to an open-records request that seeks many of the same e-mails and other documents demanded by Mr. Cuccinelli.

The university so far has granted the American Tradition Institute access to about 2,000 of some 14,000 e-mails that it is seeking, said David W. Schnare, a lawyer who heads the institute's Environmental Law Center. That case is pending in Prince William County Circuit Court, with a decision expected within a few months, Mr. Schnare said.

Mr. Mann recently finished writing a book, The Hockey Stick and the Climate Wars, that depicts the efforts by Mr. Cuccinelli and the American Tradition Institute as part of a coordinated industry-financed campaign to raise doubts about the science of global warming.

Mr. Mann said in his statement on Friday that he had faced attacks from "powerful vested interests who simply want to stick their heads in the sand and deny the problem of human-caused climate change, rather than engage in the good-faith debate about what to do about it."