Against a backdrop of intense political pressures, Interior Secretary Cecil D. Andrus and the country's most heavily subsidized irrigation district have ended a fight, lasting for years, over the cost of its water.

The agreement, reached this month but still to be ratified formally, leaves the Westlands Water District in California with a subsidy worth millions of dollars, although requiring it to pay more for its water.

Department officials depicted the agreement as a triumph, but Andrus' personal intervention in the lengthy negotiations and the terms he agreed to have created bitterness among others at Interior.

"There's no question Westlands will continue to be subsidized," said Interior Solicitor Leo Krulitz. "But this agreement provides $100 million more to the government over the life of the contract than we could charged otherwise."

Said another high-leven Interior official: "These Westlands guys have had their way for years. There's no question they used some real influence on this -- we had the whip hand and we should have held out for more."

The decision by Andrus came at a time when growers from Westlands, a district of about 600,000 acres in the lush San Joaquin Valley, have intensified their lobbying efforts to win support in Washington.

Unconfirmed reports recently indicated that the White House had directed Andrus to reach a quick agreement on the Westlands issue. Andrus would not comment on the reports and a query to White House press secretary Jody Powell went unanswered.

Solicitor Krulitz said he knew of no directive but "assumed" the White House had been kept informed of developments in the case -- a procedure he said is routine when Interior is dealing with sensitive matters of money and regulation.

Westlands farmers, many of them Republicans, have made hefty campaign contributions to the Democratic National Committee this year. Last month they played host to Rosalynn Carter at a Carter-Mondale fund raising function in Fresno.

Part of their effort has been aimed at influencing congressional action on a pending revision of the Reclamation Act of 1902, which set up the irrigation program and allowed the creation of agricultural empires in the western states.

A centerpiece of the empire has been the Westlands district where individual and corporate holdings run in the thousands of acres -- far beyond the legal, but not enforced, limit of 160 acres per person.

Interior's dispute with Westlands is related to the larger battle over tighter enforcement and revision of 1902 law, and whether the large growers or new and smaller farmers will be allowed to share the subsidy.

George Ballis of Fresno, a leader of National Land for People, a small farmer group pushing group for reform of the 1902 law, said Interior's agreement with Wetlands amounted to "much ado about nothing."

"It's a political minurt -- they're arguing over whether the subsidy is going to be 95 cents or 90 cents on the dollar. The only issue is whether the subsidy goes to the small family farmer or to the big monopoly grower. Taxpayers ought not to have to subsidize the growing food monopoly," Ballis said.

The Westlands spat with Interior evolved from a move by the Carter administration to force the district to pay more for a portion of its water supply that had been in dispute since the early 1970s.

Westlands in 1963 contracted with Interior for water at a fixed rate through the year 2008 -- a rate that meant an annual subsidy of $4 million a year.

Andrus argued that the long-term contract was not in the public interest, but he could do nothing to change the rate.

An opening was provided when the growers expanded the district without the requisite congressional approval, then insisted that Interior provide water at the 1963 contract rate of $7.50 per acre foot on 900,000 acres. An acre foot is the amount of water required to cover an acre of land with a foot of water.

Andrus and Interior aides argued that Westlands would have to pay the full cost -- that is, about $11.80 per acre foot -- if it wanted continued delivery of water. The secretary also stipulated that the old rate must be revised, the contract notwithstanding, as part of that bargain.

The dispute for months centered on the amount of revision. The final agreement will provide water at a rate of about $9.10 per acre foot for the area covered by the 1963 contract and $11.80 for the new area's 250,000 acre feet of water.

Had Westlands been required to pay the full cost of delivery, with increments for inflation and operation and maintenance of the system, its growers would have faced a bill of an additional $60 million or more.

Westlands also agreed to Interior's insistence that as much as 103,000 acre feet of water be cut from the district's allotment to protect water quality and supply in other nearby areas during dry years.

That concession by Westlands, however, could be offset by another provision in the agreement that could conflict with revisions of the reclamation law by Congress.

Language of the agreement assures Westlands growers that if the law is changed -- reducing their holdings or forcing new rates on them -- they will have a right to argue immunity.

Even if they ultimately lost the immunity by a court order, an Interior official said, years of litigation over the issue could mean Westlands farmers could collect additional millions of dollars in subsidies and earnings while the case was being decided.