The state of Montana, which owns lots of farm land but definitely is not a farmer, received just over $1 million from the Agriculture Department last year as a subsidy for participating in the federal wheat-support program.

Montana, as the owner of land that is leased to farmers, was collecting "deficiency payments," a feature of the federal farm program that is intended to provide a sort of safety net for farmers when market prices are down.

But Montana was not alone in this curiosity of current farm law. California received at least $508,000 and the University of Arizona, $492,000. In all, 29 states collected $4.1 million from a program set up ostensibly to protect individual farmers from the vagaries of the grain and cotton markets.

Deficiency payments, determined by a congressionally set target price, are a key component in the rising cost of federal farm programs, which surpassed $50 billion during the Reagan administration's first four years.

The Agriculture Department disbursed $345.4 million in deficiency payments last year, but spending in 1985 is expected to exceed $1.5 billion, a reflection of the low market prices for which the program is supposed to compensate. The only brake on outlays is a limit for each farmer of $50,000.

As Congress wrestles over a 1985 farm bill and the administration pushes for major cuts in farm spending, deficiency payments loom as a juicy target for budget-cutters in search of big savings.

A number of legislators support lowering the payment limitation as a quick way of reducing farm outlays with low political risk -- a relative handful of farmers get the lion's share of the deficiency payments. Others argue that the payments are vital in keeping the farm economy afloat.

But USDA data compiled by the Senate Agriculture Committee shows that a lower cap could achieve major savings, while keeping the safety net under a majority of farmers.

A Senate Republican budget compromise with the White House, seeking to trim farm program spending, contemplated lowering the per-farmer limit to $25,000, although a change, if one is made, would have to be authorized by Congress in a new farm bill.

Agriculture Committee staff member David A. Hill said that his review of the USDA spending figures showed that lowering the limit to $25,000 would affect less than 2 percent of participating farmers in every commodity support program except rice.

In the corn and feed-grain program, for example, USDA made 120,000 deficiency payments last year, totaling $296.1 million. But only 0.37 percent of the payments were more than $25,000, Hill's analysis showed. Those 441 farmers received $14.9 million, or an average of about $34,000 each.

In the wheat program, 1.64 percent of 362,748 participants were above the $25,000 line. Those 5,958 farmers collected $215.8 million. In cotton, 1.9 percent of 91,000 participants, or 1,743 farmers, were above the line, collecting $61.6 million.

In the rice program, 5 percent of the 29,249 participants received more than $25,000 each. Those above the line averaged $35,600 each.

Hill said that, although his analysis was not complete, those who received more than $25,000 in deficiency payments tended to be the largest and most economically secure farmers. A number of farm-bill writers, Republicans and Democrats, have expressed growing unease over defending subsidies for the largest farmers when economic stress appears greatest among the middle-sized operators.

Montana Gov. Ted Schwinden, a wheat farmer, said he agreed with the payment-limitation concept being discussed on Capitol Hill. "All of us have to recognize that farmers have to take some responsibility for the drain on the treasury," he said. "A more equitable distribution of resources could help."

He added, "If one of the objectives of farm policy is to encourage the kind of hands-on ownership and operation of what we think of as family farms, then the bottom line is that most of the so-called family farms will be under that $25,000 payment limitation that is being discussed."

In the case of Montana, the Senate committee's data show, 69 percent of the state's 17,000 wheat farms were enrolled in federal farm programs. The USDA paid $110.8 million in deficiency payments to farmers there, with about 11 percent of them receiving more than $25,000.

The Montana state government is unusual because, as the "landlord" of tens of thousands of acres held in trust for financing public schools, it shared a larger amount of deficiency payment funds with tenant farmers than did any other state. About 550,000 cropland acres are leased there, with the state typically receiving about a fourth of the crop as its share.

"We are the landlord and we get a landlord's share of the program benefits," Schwinden said. "The only place where the lessee doesn't share the income is where there is a cash lease. We led the charge in Congress to let the school trusts participate and not be subject to the $50,000 payment limit."

"By the terms of the original grant of lands, we are mandated to put this land to the highest use," he continued. "What we get from the government is hundreds of small checks. If the government held back the payments, there would be pressure to push into noncompliance with the farm programs or to go to cash leasing, and that has other serious implications."

Committee staffer Hill said that Congress could achieve additional budget savings by extending a $25,000 cap to other programs in which farmers receive direct payments.

By doing that, he said, "the government could have saved $328.1 million while only affecting a relatively small portion of participating producers" in the wool, dairy, grain reserve and emergency conservation programs.

Under the National Wool Act, for instance, only 855 of 96,108 payment recipients would have been affected by a $25,000 limit last year. Yet 41 percent of federal spending on the wool program, or $47.2 million, went to less than 1 percent of the participants.

Last year's dairy-program spending would have been reduced by $233.3 million with a $25,000 payment limit, but it would have affected only 4,313 of 38,137 participants in the milk surplus reduction program, which paid farmers to cut output.

A $25,000 cap on emergency conservation would have saved $3.9 million, or 27.2 percent of the payments made to 88 farmers in the program for rehabilitating land damaged by natural disasters. About $43.6 million, or 13 percent of total outlays, would have been saved in the farmer-owned grain reserve program by imposing the lower payment limit.