Farmers receiving subsidized water from Uncle Sam cannot sue for damages when the government decides some of that water needs to stay in the rivers and streams, a unanimous U.S. Supreme Court ruled Thursday.

Two dozen Central Valley farmers wanted $32 million as compensation from the federal government for water they were due under a federal contract. Instead, the U.S. Bureau of Reclamation diverted the water into the Sacramento-San Joaquin River Delta to protect two threatened fish species.

"This is a dramatic setback for a legal strategy that's really been growing in the last several years," said Barry Nelson, a senior policy analyst at the Natural Resources Defense Council.

At issue is a 1993 decision by the Bureau of Reclamation to halve the amount of water allocated to the Westlands Water District in the San Joaquin Valley, from 900,000 acre-feet promised in a 1963 contract to 450,000. An acre-foot of water is 326,000 gallons, enough for a family of four for one year.

The cut was needed, the agency said, to protect threatened winter-run chinook salmon and delta smelt. Westlands and some farmers sued, though the district dropped its suit two years later as part of negotiations to establish the California Federal Bay-Delta water project.

But two dozen farmers pressed on, contending they needed compensation.

William Smiland, the Los Angeles-based attorney representing the farmers, said his clients might still try to remedy what they consider a breach of contract by taking their case to U.S. Court of Federal Claims.

"When you buy water from the federal government and apply it to the land, you acquire a property right — a right to be able to buy the water in the future, perpetually," Smiland said.

The Associated Press contributed to this report. Contact Douglas Fischer at dfischer@angnewspapers.com.