Sugar turned sour, peanuts got cracked, milk was curdled and if that pattern holds up in the House of Representatives this week, tobacco could go up in smoke.

The federal tobacco price support program, for years a hardy survivor of its critics, is under unprecedented attack in the House, and even its strongest defenders concede that it is in trouble.

When the House resumes debate on a new farm bill tomorrow, Reps. Robert N. Shamansky (D-Ohio) and Joel Pritchard (R-Wash.) will call up their amendment that would wipe out the historic tobacco price and production control program.

Both sides expect the vote to be close, and there is even evidence that the political careers of some tobacco-state legislators are closely linked to the outcome.

Such a situation would have been inconceivable two years ago. Then, tobacco legislators could rely on help from other farm-state members with commodities of their own to protect. City legislators could be counted on because they needed help for their cherished urban social programs.

But all deals are off now, largely because of the Reagan administration's assault on federal spending and favored programs, which has set city against country, pitted program defenders against each other and created curious new alliances. Old liaisons have been shattered, much to the administration's pleasure, and little is any longer predictable.

One result is that the House in the past two weeks has killed a sugar-support program, reduced milk-price supports and upended a peanut program that limited production to farmers who inherit, rent or buy costly acreage allotments.

Tobacco will go into the crucible this week, and the southern Democrats who traditionally fight for the leaf find themselves ironically isolated and unable to count on northern help, in part because of their rush earlier this year to join President Reagan in cutting urban-oriented social spending.

Among the political blocs supporting the Shamansky-Pritchard amendment is the Northeast/Midwest coalition in the House, more than 100 Yankees who have stewed for years about government programs they believed were skewed to favor the South, where, of course, tobacco is king.

The situation has sent members from the two dozen largest tobacco districts into a frenzy of activity, hoping to save the price-support program from the retribution that looms. Tobacco legislators, making it clear they expected equal treatment, overwhelmingly voted for milk, sugar and peanuts last week.

The chief tactician for tobacco, Rep. Charlie Rose (D-N.C.), is plainly worried. "Tobacco hasn't been through this valley, ever," Rose said. "I want to win tobacco and win it big. But I think it's going to be fairly close."

The vote to eliminate peanut allotments and poundage controls sent shock waves up and down Tobacco Road. After peanuts and sugar toppled within hours of each other, House leaders postponed plans to finish the bill the same day, which gave Rose and his allies more time to regroup.

The argument against peanuts was based principally on the allotment and poundage system--almost identical to the tobacco program--that allows only the holders of government-issued franchises to grow the crops. Reps. Stanley Lundine (D-N.Y.) and Paul Findley (R-Ill.), the main critics, called the peanut allotment scheme feudalistic and un-American, unfairly enriching nonfarmers who own the allotments and lease them to growers.

Rose, chairman of the Agriculture subcommittee on tobacco and peanuts, and his forces face the task of overcoming a similar argument against tobacco, as well as dealing with the deep-seated antipathy of many members because of the health consequences of smoking.

He and other southern Democrats are trying openly to capitalize on another less tangible political element to help win their tobacco battle: widespread ill feeling among House Democrats toward Sen. Jesse Helms (R-N.C.), a tobacco champion who is a leading critic of federal social welfare programs. Only through strenuous arm-twisting was Helms, with the help of other allies, able to fend off attacks on tobacco when the farm bill moved through the Senate.

"We're saying, 'Help us win tobacco, because if it goes down we will be in political trouble at home that may please conservatives like Sen. Helms,' " Rose said. "We're saying that regardless of some of the problems of the tobacco program, we need their help."

The architect of the anti-tobacco drive has been Rep. Thomas E. Petri (R-Wis.), who posed his amendment as a partial reaction to earlier congressional disapproval, including that of tobacco-state legislators, of higher dairy price supports.

Petri's main argument is that tobacco allotments, poundage controls and price supports run counter to the administration's free-market urgings for the agricultural system and artifically inflate prices that consumers must pay.

He, Shamansky and Pritchard are avoiding the emotional health argument, since few experts believe that an end to the tobacco program would affect smoking habits.

And to diminish the perception of his amendment as dairy-gets-even revenge, Petri has relinquished sponsorship of the fight to Shamansky and Pritchard. They are claiming close to 200 votes in support of their proposal and have such groups as the American Lung Association, Congress Watch, the American Cancer Society, the National Taxpayers Union and the American Public Health Association on their side.

Meanwhile, Agriculture Secretary John R. Block was expected back in Washington today, cutting his Far East tour five days short, to run a salvage operation for the administration's program of price supports as the House wraps up its work on the farm bill.

The price support plans for dairy, grain and cotton are still well above those Block says will be acceptable to President Reagan, and have put the four-year cost of the bill as much as $10 billion over the program Reagan forced through the Senate last month with a veto threat.