About 6 p.m. Tuesday, Senate Finance Committee Chairman Bob Packwood (R-Ore.) put out urgent calls to an improbable group of five senators. Together they had steered a radical overhaul of the federal income tax system within sight of victory in committee. Now, at the eleventh hour, the package was in jeopardy.

"I was in the gym when I got the message," Sen. Daniel Patrick Moynihan (D-N.Y.) said. "I jumped out of the shower and headed over right away."

Packwood informed the group -- three Democrats and two other Republicans -- that oil state senators on the committee had assembled enough votes to kill the bill unless significant concessions were made to certain oil-drilling partnerships.

The "killer coalition" included Senate Majority Leader Robert J. Dole (R-Kan.) and Sen. Lloyd Bentsen (D-Tex.), two of the panel's senior members. The coalition's amendment had been stitched together by Dole and Sen. David L. Boren (D-Okla.), both of whom had supported Packwood on a series of close votes early in the day.

The coalition wanted Packwood to protect certain independent oil drillers in their home states from a crackdown on tax shelters. Without that compromise, the entire bill was in jeopardy. At best, it would pass by no more than a vote or two. Quite possibly, it would unravel.

Packwood's compatriots were restless. Sen. Bill Bradley (D-N.J.), the Senate's pioneer tax-overhaul advocate, doubted that oil states needed the break. Sen. John H. Chafee (R-R.I.) wanted to take them on. So did Packwood, though he saw no way out. His group also included Sens. George J. Mitchell (D-Maine) and John C. Danforth (R-Mo.).

"We've already closed $50 billion in loopholes" of tax shelters, Packwood recalled reasoning at the time. "Don't let it all go down the drain over $700 million in benefits to oil tax shelters . They simply had the votes."

Hours later, the committee met in closed session. Boren introduced the oil-state coalition's compromise for $1.4 billion in tax benefits over five years (twice the amount Packwood's allies had expected). Packwood and his allies voted no. They lost by one vote. The oil states won the battle.

Then Packwood won the war.

With the compromise in place, the bill passed his 20-member panel unanimously. The committee of Democrats and Republicans, young and old, rural and urban, stood to applaud their chairman.

"It's not the whole loaf," Bradley said. "But we got almost the whole loaf."

What they got was a bill that would almost halve the top individual tax rate to 27 percent, cut the corporate rate by a third and remove 6 million low-income Americans from the tax rolls. The money to pay for these benefits would come from increasing corporate taxes $100 billion by 1991, repealing dozens of widely used deductions and virtually eliminating tax shelters, except oil ventures in which partners are liable for their losses.

To win the unanimous vote, however, Packwood had to go beyond those broad goals and satisfy an extraordinary range of interests -- from the oil bloc, to liberal Democrats who won relief for the poor, to Sen. David F. Durenberger (R-Minn.), who saved benefits for buildings financed with tax-exempt bonds, to defenders of 401(k) employer-employe savings plans, who won minor concessions at the last minute.

These provisions each had supporters who navigated through a grueling, 3 1/2-hour brokering session behind closed doors, just before the panel emerged to approve the measure. Packwood had called the session to speed up negotiations.

A key ground rule was approved early in the day, forbidding anyone to add a tax break without proposing how to pay for it, in tax increases elsewhere. So the closed-door session turned into a sort of auction, in which tax breaks were pitted against tax increases.

Back and forth, Packwood paced the increasingly stuffy room, calling for votes on a $1.2 billion tax break for foreign investors in property (it passed), an $850 million tax break for investors in low-income housing (it failed), a $6.2 billion tax increase on manufacturers who used the investment tax credit (it passed), a tax break for investors in chicken coops and hog pens (it failed) and so on.

The oil debate took up almost half of the session. Boren led the charge, arguing that the independent oil producers in his state, already in crisis from plunging prices, would be unable to finance drilling without the tax-sheltering incentive. Dole made a similar pitch, as did Sen. Malcolm Wallop (R-Wyo.), Sen. Russell B. Long (D-La.) and others.

"It was an implied threat and the most distasteful part of the whole process," Durenberger said. "I had been called a Judas earlier in the day by real estate interests in my state [for opposing shelters], and I had to go in there and watch the committee be blackmailed by the oil and gas interests."

Sen. David H. Pryor (D-Ark.), a self-styled folk philosopher who teamed up with the oil coalition, phrased it more kindly, several senators said.

"We all have our problems and need help from the federal government now and then," he was said to have observed. "Now it's the oil and gas industry's turn, and we ought to go along, because we all have to work together."