The Indians of this broad valley of cottonwood, cattails and and sparkling lakes have seen many heartbreaks. Last summer they began to prepare for one more.

For eight years the local tribes, hoping to assure their economic survival, had sought control of the profitable Kerr Dam, located on tribal land but controlled by the Montana Power Co. The utility resisted, saying the tribes had neither the expertise nor the market contacts to make good use of the hydroelectric facility. In August a federal regulatory judge indicated that he was close to dismissing the tribal request.

The dispute seemed certain to bring nothing but years of dreary argument in the courts, something with which American Indians are all too familiar.

Yet today the Confederated Salish and Kootenai Tribes find that they have in hand the signed promise of the once-recalcitrant power company to turn over the 180-megawatt dam in 30 years, plus a $9 million annual payment for its use in the meantime. Training for the tribal members who will run the plant has been assured, as have connections to future customers.

What once seemed only one more chapter in a bitter and debilitating confrontation has been transformed into victory, in part through the accumulating bargaining skills of young professionals on the tribal council and its staff. It was a compromise lubricated by new recognition of Indians' political clout and utility executives' willingness to take Indian representatives more seriously than their forebears did.

Perhaps most surprising to both whites and Indians in this generally male-run expanse of rural Montana was the role played by Teresa M. Wall, 30, the youngest member and only female on the tribal council.

"The job she did was very notable," said Dean Conklin, chief spokesman for the power company. A native Montanan with a bachelor's degree in education and Native American studies, Wall spent the last frantic weeks of negotiations in Missoula helping her fellow council members keep the tribes informed, navigate the tricky waters of tribal politics and determine how much the company would be willing to give in return for peace with this especially well-organized tribe.

Wall rejects the idea that she played any special role: "I was just one of a number of council members concerned about the issue."

"This tribe and this reservation is considered one of the most progressive," said Bill Sager, editor of the local Ronan Pioneer. "The agreement they worked out . . . falls into the category of common sense," creating what he said was a general feeling of relief throughout the Flathead Basin.

Not only did the confederated tribes profit from the political acuity of council members like Wall and council Chairman Joseph (Joe-Dog) Felsman and the technical skill of an increasing number of tribal lawyers and economists, but they also found their bargaining power enhanced by the political atmosphere left by the sit-ins and occasionally violent confrontations of the Indian movement in the 1970s.

Despite what looked like a strong court case and a desire to hold onto a dam providing 35 percent of the company's hydroelectricity, Montana Power realized that things had changed in the last two decades; Indian appeals for self-determination had acquired important support in Washington. "There have been some societal changes whenever Indian access to natural resources have been considered," Conklin said.

At the beginning, Wall felt "we had very little on our side" for arguing in court. They owned the land, having granted the company a 50-year lease in 1930, and the council believed that "Indians have a right to control and manage their own property," Wall said. "To provide jobs for members, the tribe has got to become self-sustaining."

It could not do that on the $2.6 million annual payment it was receiving from Montana Power for use of the land. According to Ron Trosper, a tribal member and Harvard PhD serving as staff financial analyst, the tribes were "not paid remotely what it was worth."

But the company, Wall noted, was obliged to raise its annual payment whatever happened -- some court witnesses suggested as much as $47 million a year. The dispute had dragged on so long that even if the company insisted on retaining control of the dam, it might be forced to pay a retroactive lump sum of more than $100 million. "They could not afford a big cash payment," Wall said.

Joseph McElwain, the retiring Montana Power board chairman, decided a deal might be struck. The tribal council and its Washington attorney, Foster De Reitzes, noting that Federal Energy Regulatory Commission Judge Bruce Birchman was near dismissing their petition for the dam license, also thought a compromise worth trying.

The parties met off and on for three weeks in Missoula. Wall and the other tribal negotiators often drove back the 60 miles to their headquarters here to seek a consensus for their counterproposals. One former council member petitioned for the tribes to accept a one-time $30 million payment for a 20-year lease on the dam. The company would retain control of the license, but each tribal member might get up to $5,000 in the deal.

The council shrugged off the petition and the company refrained from exploiting it. The talks continued, Wall said, "very friendly and professional." In the end the council saw a company offer it liked.

Under a 50-year joint license awaiting federal approval, the company will control the dam for the next 30 years but train tribal members to take over operations for the following 20 years. In return, the tribes agreed to raise the annual lease to only $9 million with no retroactive payment and promised at takeover to pay the company the $18 million cost of construction and improvements, minus depreciation.

Some critics expected whites to complain that the agreement would raise electric bills, but there has been little such reaction, with the average family expected to pay less than one dollar extra a month. Wall applauds the successful negotiation of a political thicket: "It's a good deal -- for today and for the future."