HELENA, Mont. (AP) – A legislative proposal that would recognize Native American water rights attracted hundreds of people to a committee hearing at the Montana state Capitol Saturday, drawing reaction from tribal officials and some non-tribal farmers during seven hours of testimony.

Some 400 people turned out for the House Judiciary Committee hearing. The panel planned to vote on Senate Bill 262 Monday morning.

The measure would ratify a negotiated agreement between the Confederated Salish and Kootenai Tribes and the state and federal governments regarding rights to use water in northwestern Montana.

Irrigators in favor of the proposal say it recognizes tribal rights while ensuring non-tribal members receive water. Opponents say it would strip non-tribal members of their water rights and give the tribes and federal government free reign over Montana water.

“If this doesn’t go through, buy a fishing pole because you’re not going to be irrigating in August,’’ Republican Rep. Daniel Salomon said in support of the measure.

If the deal fails in the Legislature, the Tribal Council has stated it will petition for water in court ahead of a June 30 deadline for such claims to be considered.

Confederated Salish and Kootenai Tribes Chairman Vernon Finley as well as multiple attorneys said the federal government and courts have clearly recognized and will continue to uphold the sovereign rights of Native American tribes.

“We have the right by treaty to the water throughout all of our aboriginal territory, which covers about two-thirds of the state of Montana,’’ Finley said.

Finley said the tribes gave up a lot of rights in the negotiation that they could regain in court if the compact fails.

“We can apply your laws to this situation and in 20 years we’ll come out further ahead than what we’re handing to you in this compact,’’ Finley said. “It’s up to you.’’

The proposal is a renegotiated version of a compact that failed in the 2013 Legislature. The biggest change was ensuring irrigators a delivery entitlement, which guarantees farmers and ranchers will forever receive the amount of water they’re using now.

The renegotiated version also includes a provision requiring the tribes to share non-irrigation water during shortages or droughts as well as an increased pumping fund.

Jerry Laskody, chairman of the Flathead Joint Board of Control that represents farmers on the reservation, said the board commissioned its own study that found the compact would significantly decrease the amount of irrigation water. Ed Everaert, a water resource engineer found that Laskody himself could lose 55 percent of his current water delivery under the proposal, Laskody said.

Bill sponsor Republican Sen. Chas Vincent of Libby said Laskody and other opponents who said they’d lose water are incorrect because the compact calls for years of measurements and research to accurately determine how much water irrigators will receive.

In a region dominated by agriculture, the question of Indian water rights has driven rifts between neighbors with opposing viewpoints this year.

Paul Guenzler, a fourth-generation farmer in Ronan, said after speaking in favor of the proposal that if it seemed that more irrigators testified against than for the compact, it’s because supporters are reluctant to express themselves out of fear of losing business or friends.

Greg Schock, a proponent and dairy farmer, said some St. Ignatius residents have stopped sitting next to each other at church, or stopped going altogether, to avoid hostility. “It’s really gotten ugly,’’ Schock said.