Wheat farmers waiting to unload their trucks were treated to an odd spectacle near here when a freight car standing on a particularly bad stretch of Milwaukee Road track began sagging to one side.

As the farmers watched in amazement, the car tilted lower and lower until finally, as the track gave way, it toppled like a dead horse onto its side.

While such incidents do not happen around here every day, they do occur with a frequency that evokes both outrage at the Milwaukee Road's shoddy condition and anxiety that, bad as it is, the railroad may soon cease to operate.

That day may not be far off. The Chicago-based railroad has requested permission from a federal court to abandon most of its track, including nearly all its 1,310 miles of siding and main line in Montana.

If the railroad gets the go-ahead for dismemberment, Montanans fear that the effect here could be catastrophic. The Milwaukee Road hauls about 12 percent -- some 20 million bushels -- of Montana's wheat crop, fifth largest in the nation. The railroad's equipment also moves copper from Butte, coal from the mines in the eastern prairies and lumber from the north.

In this vast, sparsely populated state, traditional transportation priorities become inverted. For anything more than a local hop, cars and trucks are luxuries while trains and airplanes are the primary way of getting around and moving freight.

"Out here the railroad is the only way we can tie the open spaces together," said Gordon McOmber, a wheat farmer who heads the Montana Agriculture Department. "Adequate transportation becomes economic survival here. We're aboslutely dependent on the railroads."

That dependence is clearly evident here in Denton, a community of 400, most of them tied in one way or another to the grain business. Across the Judith Basin, named by Lewis and Clark in 1803, the land is striped with ripe and cut wheat fields. Farm trucks heavy with wheat raised clouds of dust as they roll through town to the cluster of tall elevators along the tracks.

"If the railroad went it could literally kill our town, I mean kill it off completely," said Mayor Robert Patterson.

Patterson and George Skarda were sitting in the late afternoon shade of a grain bin here, taking a break for an early supper before finishing off the cutting of Skarda's 500-acre barley crop.

"We figure if the railroad goes it will take farmers here about 4,000 extra truckloads to get their crops to the nearest rail line. Our roads aren't made to take that kind of punishment," said Skarda, 60, who is the former head of Montana's wheat research and marketing committee.

To carry his crops 90 miles to Great Falls, where the nearest remaining rail line would be, would cost about $4,500 extra, Skarda said.

The loss of the railroad here would also mean the loss of 750 jobs. In a state of about 700,000 persons -- less than the population of Baltimore -- that kind of job loss hurts, said McOmber.

"The size of our population has always been a problem," he said. "We only have about one-third of 1 percent of the national population. So when the people back in Washington decide something has to go, the fact that it is our railroad doesn't make a hell of a lot of difference."

But even more worrisome to many people here than the economic cost, or the ravages to country roads extra trucking would bring, is the prospect that once the Milwaukee Road goes the state will be left at the mercy of the lone remaining rail line, the Burlington Northern.

State officials and others conjure up visions of a monopoly railroad squeezing dependent farmers with high shipping charges and poor service.

"Everywhere else the BN has tough competition," said Terry Whiteside, another state agriculture official. "Here, they can use us to make up their losses."

Montana has tried recently to stir up interest in a coalition of shippers, unions and other western states to purchase the Milwaukee Road track. But the response has been only lukewarm. Washington and Idaho rely on barge traffic to move most of their freight, while east of here the effect of the rail cuts won't be felt so badly.

State officials say that because of the Milwaukee's failing condition in recent years the Burlington Northern already has raised its rates higher for Montana shippers than for shippers in more competitive states.

"The problem here," said McOmber, "is that for the past few years there hasn't been any railroad competition. The railroads here gave up competing after they beat out the horse."