SAN DIEGO (AP) — A state appeals court is upholding a landmark agreement on how Southern California gets its water, overruling a judge who called it unconstitutional.

Wednesday's decision by California's 3rd Appellate District Court in Sacramento is a major victory for backers of the agreement that created the nation's largest farm-to-city water transfer. The 2003 accord also set new rules for how California divides its share of the Colorado River's water.

A three-judge District Court panel disagreed with a judge who ruled last year that the state violated its Constitution by essentially writing a blank check to save the Salton Sea.

The shores of California's largest lake are rapidly receding. The transfer of water from rural Imperial Valley to San Diego threatens to accelerate that decline.

Copyright 2011 The Associated Press.