The grueling, months-long budget marathon entered its final stretch early today as the House and Senate negotiators reached final agreement on a deficit-reduction package and the House moved toward a vote on the measure, which is supported by the Bush administration.

In the end, though, lawmakers moved the finish line a bit closer, falling about $10 billion short of the five-year deficit-reduction goal of $500 billion that bargainers have been striving to meet since May. The first-year savings for the current fiscal year, now 27 days old, would still meet the target of $40.1 billion.

Early today, House Democratic leaders continued scrambling to round up the final votes needed to pass the measure. Their task was complicated by the reluctance of most House Republicans to vote for anything that raises taxes. That would require overwhelming Democratic support in order to pass the measure.

As the House began a three-hour debate on the package at 1:35 a.m., Republicans launched a last-ditch attack on the deficit bill amid Democratic predictions that it would pass by a small margin.

"No one is certain what the {deficit reduction} figure is," said Rep. Robert S. Walker (R-Pa.). "Every dime in revenue is going to new spending."

The five-year shortfall was the result of a combination of pressures to contain increases in Medicare premiums, hold down tax increases and include a handful of tax breaks for oil and gas drillers and small businesses that would cost several billions of dollars.

Lawmakers seemed reconciled to a smaller package of tax increases and benefit program cuts if that would help win passage. "We're trying to push as hard as we can" for additional savings, said House Budget Committee Chairman Leon E. Panetta (D-Calif.). "But it's still a significant deficit-reduction number and we ought to get it done."

"When you get $490 billion out of $500 billion, you get pretty damn close," said Senate Finance Committee Chairman Lloyd Bentsen (D-Tex.).

In spite of the missed target, the White House supported the package. "They're on board at this moment," said Rep. Bill Frenzel (Minn.), the House Budget Committee's ranking Republican.

As lawmakers hailed the package as the biggest deficit-cutting measure ever, the Treasury reported that the federal budget deficit for the fiscal year that ended Sept. 30 was $220.4 billion, the second highest ever. Last year's deficit-reduction legislation projected that the shortfall would be $99.7 billion. Less than $2 billion of the change was due to additional domestic spending by Congress. The rest was the result of a weaker than expected economy and the additional costs of the savings and loan cleanup.

House leaders pressed for a speedy vote on the measure. "The longer it goes on, you begin to lose momentum," Panetta said. "We're running on maximum momentum right now."

The Senate is expected to consider the measure today.

Overall, the package contains provisions designed to generate $164.6 billion in new tax revenue over five years. It also includes tax breaks aimed at the working poor, oil and gas developers and small businesses that would lose $27.3 billion over that period.

Benefit programs, ranging from Medicare and Medicaid to farm subsidies and veterans benefits, would be trimmed by $100.8 billion over five years -- about $3 billion short of the bargainers' goal.

The measure would write into law spending limits for military, domestic and foreign aid programs over the next three years. Pentagon accounts would be cut $67.2 billion below the level needed to keep pace with the projected rate of inflation while domestic and foreign aid programs would grow with inflation. In the fourth and fifth years of the five-year accord, the $115 billion in savings would be allocated between military and non-military accounts by House and Senate appropriations committees.

Medicare, the fastest growing federal program, would be pared by about $44 billion from anticipated levels over five years. Most of the savings of about $34 billion would result from reduced reimbursements to physicians and hospitals.

Only $10 billion of the Medicare savings would come from beneficiaries. The amount of out-of-pocket costs they must pay before receiving benefits for the voluntary coverage of physicans and outpatient hospital services would increase from $75 to $100. Monthly premiums for the same program would gradually rise from $28.60 this year to $29.90 next year and to $46.50 in 1995.

New Medicaid spending would be cut $1.9 billion over five years by requiring drug companies to offer discounts to those in the program.

Farm commodity programs would be cut $11.9 billion over five years and veterans' benefit programs would be trimmed $3.7 billion over the same period. Federal employees would no longer be able to take their retirement pensions in a single payment, saving the government $7.6 billion over five years.

The measure also includes new spending. Medicaid, which helps the poor pay for health services, would be expanded to pay Medicare premiums for more elderly poor and provide home care for them. In addition, the program would be expanded to cover more children.

People who earn between $51,300 and $125,000 would pay $26.9 billion more in Medicare payroll taxes over five years. Those who drive, smoke, travel on commercial airlines, drink alcoholic beverages and buy such expensive items as furs, jewelry, luxury automobiles, boats and private airplanes would pay a total of $28.1 billion in higher taxes over five years.

The measure would raise $11.2 billion over five years by evening out the top two marginal individual income tax rates at 31 percent. That would be an increase from 28 percent for the approximately 600,000 highest income Americans and a cut from 33 percent for 3.5 million upper-middle-income taxpayers.

But the measure would also limit the benefit of the tax deductions claimed by taxpayers with adjusted gross incomes higher than $100,000 a year, generating $17.9 billion, and gradually eliminate the $2,050 personal exemption for individuals who earn more than $100,000 and couples filing jointly who earn more than $150,000. Those provisions would raise another $10.8 billion.

In addition, the working poor would benefit from a $12.4 billion, five-year expansion of the earned-income tax credit.

The measure would also extend through Dec. 31, 1991, tax breaks that would have expired this year.