It was around midnight when Minority Leader Robert H. Michel (R-Ill.) walked into the well of the House, and the members in the packed chamber rose to give him a standing ovation.

For a week he had been under siege with his lieutenants in full revolt, and for four days he had been unable to budge the number of Republicans willing to vote in favor of the budget agreement endorsed by President Bush and the bipartisan congressional leadership.

Now the 34-year veteran legislator from Peoria, known for his calm demeanor, was trying to save face for the president -- and for himself. First, he reasoned. Then, his neck and face flushed red with emotion, he pleaded for support for the five-year, $500 billion deficit-reduction plan, appealing to his colleagues: "Lose this moment, pick apart the agreement with a thousand points of spite, and we not only lose the agreement but the will to truly govern."

He defended the deal's most unpopular components and said: "Vote for this resolution. It is bitter, bitter medicine. But we won't cure our national budget sickness without it." With characteristic midwestern courtesy, Michel ended: "I'd appreciate it if you could help us out on this."

In the end, his effort fell short. At 1:17 a.m. Friday, as lawmakers craned their necks to stare at the vote tally board, the number of red lights marking votes against the budget resolution outnumbered the green lights.

It was a rejection of both the particulars of the budget package and the process that brought it about. Conservative Republicans thought the taxes were too high and the spending cuts too shallow. Liberal Democrats thought the benefit program cuts were too deep and that taxes on the rich were too low.

And members from both parties complained that the package had been concocted by a bipartisan leadership cabal that had usurped the prerogatives of the entire Congress.

"Budget summitry has reduced the process to a small cadre of members who have further eroded collective congressional responsibility," said Rep. Ronald V. Dellums (D-Calif.), chairman of the Congressional Black Caucus. Gesturing with his long arms, the lanky Dellums said "this proposal contains concessions this gentleman can't even fight."

Congressional leaders, he said, had "opted for process over substance." They were "blurring the distinction between the executive and legislative branches" and the system of "checks and balances is going out the window."

"I was elected to make tough choices, and I'm willing to do so," said Rep. Marty Russo (D-Ill.). "Budget summits encourage the leadership of both parties to ignore the will of the rank-and-file members of Congress and effect legislation without going through the legislative process."

The debate had begun after the House interrupted consideration of an anti-crime bill Thursday night to take up the budget resolution.

For some lawmakers, the change was a subtle one. In the budget package, they found many political felonies and misdemeanors, ranging from higher taxes on gasoline, beer, wine, liquor and cigarettes to higher out-of-pocket costs for Medicare beneficiaries. And the punishment, they feared, would be an end to their political lives.

"Tonight, we'll find out if the death penalty really is a deterrent," thundered Rep. James A. Traficant Jr. (D-Ohio).

Apparently, it was. Criticism came from both sides of the aisle.

Russo, a housemate of the resolution's floor manager, House Budget Committee Chairman Leon E. Panetta (D-Calif.), said the plan "puts the burden squarely on the middle class yet again. . . . Why? Why is the middle class bearing a disproportionate share of the burden of reducing the deficit?"

"Let us give the American people a more reasonable, better solution," said Rep. Bud Shuster (R-Pa.).

Although the debate had moments of drama, many of the party leaders seemed to be going through the motions, as though the result had been preordained. Democrats insisted that both parties produce a majority of their members in favor of the resolution in order to spread the political pain, and blame, for the unpopular package. Yet that looked unlikely, at least among Republicans.

Before the vote, House Speaker Thomas S. Foley (D-Wash.) closed the debate in a rare speech from the floor. "This is one of the most important evenings, perhaps, in your congressional career," he said trying to draw on lawmakers' institutional pride. "Although the divisions are sincere, we have the opportunity to stand together," Foley said. "If not now, when? If not us, who?"

The vote began at the stroke of 1 a.m. A solid core of "Yes" votes quickly went up on the board. Although the speaker seldom votes, one of the first votes on board was Foley's.

Members crowded in the well, studying the electronic tote board that displays each lawmaker's vote. Liberal Democrats held back, waiting to see how many Republicans Bush and Michel could deliver.

The "Yes" GOP votes hardly budged as the 15-minute clock counted down. The liberal Democrats began voting "No."

When the vote closed at 1:17 a.m., only 71 of the 176 Republicans were recorded as voting "Yes" -- just two short of the solid votes in favor of the resolution that GOP vote-counters found Monday and that Michel earlier in the night had told House Majority Leader Richard A. Gephardt (D-Mo.) to expect. Only 108 of the 257 Democrats were recorded in favor.

The voting pattern betrayed local concerns and institutional loyalties. Among lawmakers from New Jersey, where former House member Gov. Jim Florio (D) has set off a firestorm with higher taxes, all seven Democratic members of the delegation voted "No." Ironically, Rep. Jim Courter (R), whom Florio defeated for governor, voted in favor of the package.

Among the 11 lawmakers from Massachusetts, where the economy is in tatters and red ink is flooding the state budget, only two -- House Rules Committee Chairman Joe Moakley (D) and Rep. Silvio O. Conte, the ranking Republican on the House Appropriations Committee -- voted for the deal.

From the Appropriations Committee, a panel made up of lawmakers who typically are loyal to the institutional prerogatives of the House and who would have been given great power over determining spending priorities under the plan, seven of the 13 subcommittee chairmen voted against the deal. Among them was Appropriations Committee Chairman Jamie L. Whitten (D-Miss.).

All three House members running for Senate seats this fall voted against it, fearful of popular reaction.

Only one House member missed the vote. Rep. George W. Crockett Jr. (D-Mich.), who is retiring this fall, grew tired during the long night of debate and went to his office to take a short nap. But the 81-year-old Democrat, who has two hearing aids, didn't hear the House bells announce the voting and slept through it.