For many years, the states of Montana and Wyoming have been battling over water from the Yellowstone River, but now the U.S. Supreme Court has sided with Montana in the dispute.

Spokesman for Montana Attorney General Tim Fox, Eric Sell, said on Tuesday that a Special Master appointed by the Supreme Court ruled that Montana is entitled to water previously being withheld by Wyoming for irrigation.

"The Special Master said Montana is entitled to compensation i n the form of water from the State of Wyoming," said Sell. "This is all stemming from the Yellowstone River Water Compact that was passed by Congress in 1950. This ongoing legal battle began in 2007, and we're hopefully nearing the end. Today's ruling by the Special Master is just the latest development."

Sell said the controversy became especially relevant during years of drought in southeastern Montana.

"In lean water years, the State of Montana was short of water coming from the Yellowstone River because Wyoming would use up a lot of the water before it could flow into Montana," he said. "The ruling allows Montana to assert its water rights under the Yellowstone River Water Compact."

Sell said either party can appeal the Special Master’s opinion to the full Court if they choose.