When President Bush boarded Air Force One in New York Sunday morning for the quick flight back to Washington, he wasn't sure whether he was coming back to bless a budget deal or to face a roomful of snarling negotiators at the White House.

"We were not convinced there was going to be a deal," a Bush administration official said. "He was going to try to close the deal when he got in the room."

Hours later, Bush, who had won election pledging "no new taxes," was standing with congressional leaders in the Rose Garden, squinting into the sun and announcing the largest package of tax increases and spending cuts ever proposed.

The road to that ceremony began on a cool evening in early May, upstairs in the private quarters of the White House, when Bush asked four of the top congressional leaders who stood with him Sunday to begin talks aimed at getting the burgeoning federal budget deficit under control.

The journey took the bargainers from the Cabinet Room of the White House to a converted bar at Andrews Air Force Base and finally to House Speaker Thomas S. Foley's private dining room in the Capitol. The main issue had not changed since Office of Management and Budget Director Richard G. Darman defined it in February: "It is a question of when to invest the political capital in a big fix."

For each side, that meant giving up something dear. For Democrats, it meant accepting large cuts in social programs they had long fought to protect and the postponement of their efforts to shift more of the tax burden from the middle class to the rich. For Bush it meant abandoning his campaign pledge against new taxes as well as his personal crusade to cut taxes on capital gains.

Partisan bickering surrounded congressional deliberations over the budget from early January, when the administration first proposed its fiscal 1991 spending plan, until Bush suggested talks in May. Democrats only agreed to go the table after the president cracked open the door to the possibility of new taxes.

When the talks began in May, they did not look promising. Senate Majority Leader George J. Mitchell (D-Maine), still smarting from last year's fight over capital gains, distrusted Darman. The president disliked House Majority Richard A. Gephardt (D-Mo.), who had scrapped with Bush on issues ranging from tax fairness to foreign policy.

In addition, there were more than two sides to these talks. House GOP Whip Newt Gingrich (Ga.) did not subscribe to a basic premise of the talks: that new taxes were needed. At one point, Gingrich advertised his lack of enthusiasm for the process by ostentatiously reading books and magazines during bargaining sessions, participants said, exasperating even fellow GOP negotiators.

Darman and White House Chief of Staff John H. Sununu took the Republican lead, to the irritation of some GOP bargainers. "We meet every day before the other meeting just to see what Mr. Darman has in mind so we're not surprised -- as much surprised," said Senate Minority Leader Robert J. Dole (R-Kan.).

On the Democratic side of the table, House leaders, were more eager to cut a deal with the administration than their more partisan Senate counterparts.

The talks dragged on through the summer, past self-imposed deadlines, as the bargainers engaged more in political posturing than serious negotiating. At several key points, administration actions saved Democrats from embarrassing splits in their own camp. In late June, for instance, when the Democrats were deeply divided over how to proceed, Bush threw GOP negotiatiors into turmoil by declaring that "increased tax revenues" would be necessary.

Hoping that a change in scenery would lead to a change in attitude, the negotiators moved talks to the Andrews Air Force Base Officers' Club. What began as a weekend retreat became an 11-day siege so slow-moving that one participant likened it to "being in a 10-reel Fellini film."

"There was a great rush of optimism after the first two or three days," said an administration participant. "We got past some easy hurdles."

But the early enthusiasm wore off.

The talks nearly broke down the fourth day at Andrews. At one point, participants recalled, Sununu rebuffed a Democratic offer by remarking, "It's worse than before." Darman tried to keep the talks moving. As Sununu kept complaining in a rising voice, Darman glanced at Sununu and laughed nervously, participants said.

Later that day, participants recalled, when a Democratic domestic spending plan fell $20 billion short of Republican demands, Sununu cried: "Where's the rest of it? Where's the other $20 billion?"

His outburst prompted Sen. Robert C. Byrd (D-W.Va.), the venerable Senate Appropriations Committee chairman, to rebuke Sununu and Darman, calling them "arrogant" and "rude," participants said.

The Republicans quickly retired to a private caucus and returned with a counterproposal that moved toward the Democrats in several areas.

Gephardt rose in the esteem of the administration, meeting daily in private with Darman to try to hammer out differences. Gephardt "was the glue that held their side together," said an administration official.

For the first time, the talks turned to taxes, and the Democrats clearly established that their price for the president's cherished capital gains tax cut would be a higher income tax rate for the richest Americans.

Republicans complained that Democrats caucused for hours on administration offers, but Democrats said they wanted to consult crucial committee chairmen.

Progress slowed. During one long break, some Republican bargainers played nine holes on the base golf course. Republicans were irritated when House Majority Whip William H. Gray III (D-Pa.) arrived at meetings in tennis clothes. Food became a high point. Participants said they were particularly fond of the vanilla ice cream and hot fudge sauce and the base's regular Monday night prime rib special. Rep. Silvio O. Conte (R-Mass.) called the scene "Camp Run-Amok."

"Maybe it would have ended sooner if the food wasn't so good," said one participant. "It wasn't going to end before prime rib night rolled around again. On Monday night, we had our prime rib and left."

After 11 days, "We had hit the wall," a participant said. Gephardt, Mitchell and Darman met and acknowledged that this phase had ended. They decided the negotiations should continue in a smaller group of top congressional leaders and administration officials.

To accentuate the differences between administration and Democratic bargainers on taxes, Gephardt and Mitchell persuaded their team to make significant concessions on spending in order to portray capital gains as the main remaining obstacle.

The bargainers left Andrews significantly closer. "There was no way else you could have gotten them to move that much," a participant said of the self-imposed seclusion. "But you should have been able to do that in two days."

When the smaller group of top-level negotiators, dubbed "The Big Eight," convened in Foley's red-walled dining room, congressional officials expected it to be a brief interlude between the larger bargaining group sessions and final meetings, in which Democrats wanted to involve Bush directly so as to make him share responsibility for an unpopular package.

The talks centered almost exclusively on taxes, officials familiar with the proceedings said. As the talks dragged on, cracks formed in GOP unity. First, Dole suggested that capital gains be considered in a separate legislative package from spending cuts and tax increases. But administration bargainers knew the quest for the capital gains tax cut was dead when the man from Peoria -- House Minority Leader Robert H. Michel (R-Ill.) -- said no.

Never as enthusiastic as Bush about reducing the capital gains tax, Michel had been growing increasingly frustrated with the pace of the negotiations. Last Tuesday, the plainspoken midwesterner finally broke his public silence, telling reporters: "The doggone price is too steep. . . . Politics is the art of what's possible."

"Sununu knew, when Michel said what he said, that he couldn't get capital gains," an administration official said.

But administration bargainers were determined not to give in until Democrats stopped demanding an income tax rate hike, fearing that if they conceded too quickly the Democrats would try to trade something else for a higher rate.

As yesterday's fiscal deadline approached, one top administration official accused the Democrats of "playing chicken" with the nation's economic well-being. Finally, in the early hours of Sunday morning, the administration bargainers dropped their capital gains issue in favor of other tax breaks for investments. Democrats retreated on higher tax rates, settling on a limitation of tax deductions for the wealthy.

Within hours, the rest of the deal fell into place.

They rushed to the White House with a sketchy plan, leaving staff to work out many of the details. But at the last minute, there was confusion. A draft agreement said heating oil would be exempt from a 2-cent-per-gallon petroleum tax when Senate Finance Committee Chairman Lloyd Bentsen (D-Tex.) had removed the exemption, irritating northeastern lawmakers.

A dispute over military spending prompted Darman to threaten, "If you do that, the deal is off!"

For many bargainers, Sunday night meant the first full night's sleep in days. "It's good to be back to life," Gephardt joked, "taking fluids and seeing my family."

Staff writer Dan Balz contributed to this report.