After a rancorous and relatively unproductive session, Congress yesterday completed its work for the year with a flurry of last-minute activity, finishing its spending bills, restoring cuts in the Medicare program and adopting the first major legislation for the disabled since 1990.

After several weeks of legislative jousting, marked by the careful juggling of regional and partisan differences and obstructionist tactics, the end came quickly after a few recalcitrant senators dropped plans for an all-night filibuster to protest a dairy provision favoring Northeastern dairy farmers.

Senators were so eager to finish up and catch their planes home that Senate Majority Leader Trent Lott (R-Miss.) dispensed with the customary end-of-session rhetoric and simply wished his colleagues a happy Thanksgiving and Merry Christmas.

Sen. Herb Kohl (D-Wis.), the leader of the holdouts, gave up after getting leadership assurances of a full hearing next year on the dairy controversy and after colleagues from both sides of the aisle warned him he would be doing his cause more harm than good by keeping the Senate in. "You're not helping yourself by forcing everybody to tell their wives their Thanksgiving vacation is being postponed," said a senior Republican aide.

By 74 to 24, the Senate approved the $385 billion spending package that finances seven Cabinet departments and the District of Columbia government, frees up nearly $1 billion to pay U.S. debts to the United Nations and restores more than $12 billion that was cut from Medicare two years ago. The budget package also grants satellite television companies the right to broadcast local channels, a move that will give cable companies new competition.

In a separate 95 to 1 vote, the Senate approved an extension of expiring tax provisions, including a research and development credit important to high-tech industries, and legislation to allow disabled people to retain their government-financed health benefits when they enter the work force.

The work-incentive legislation, spearheaded by Sens. James M. Jeffords (R-Vt.) and Edward M. Kennedy (D-Mass.), would allow disabled people to keep Medicare benefits longer than currently allowed and would let them buy into the Medicaid program. It is aimed at removing what many disabled advocates say are government disincentives to work.

The House approved these measures late Thursday before members departed for the year. President Clinton is expected to sign all the legislation, although White House officials are still furious that Lott used the tax and work-incentive legislation as a vehicle for derailing a hard-won compromise aimed at developing a fairer system for organ transplants.

The huge budget package, containing the remaining five of 13 spending bills, was finally cleared seven weeks after the start of the new fiscal year and includes important spending and policy victories for the administration and the Republicans alike. Voting for the package were 42 Republicans and 32 Democrats, including all the local senators.

In all, the 13 spending bills covering all defense and domestic spending other than entitlements total $609 billion. That sum busts the spending limits both parties agreed to only two years ago; the bills also use a variety of creative accounting tactics aimed at making total spending seem smaller than it is. It was part of an effort to finance government without seeming to tap surplus revenue generated by Social Security taxes, a cause championed by leaders of both parties.

Administration officials have been critical of some of the GOP tactics, including declaring the 2000 census an "emergency" and postponing a large portion of the National Institutes of Health's budget. But in the end, the White House essentially gave tacit approval to the Republican accounting approach.

Over the course of the budget negotiations, Clinton won more funds for his signature programs to hire more teachers and community-based police officers, to acquire more fragile western lands, to underwrite the Wye River Middle East peace accord and to pay nearly $1 billion in back debts to the United Nations. He also won concessions on environmental provisions, including changes in regulations governing hard-rock mining and dumping mine waste on public lands.

White House budget director Jacob "Jack" Lew told reporters yesterday that Clinton had achieved virtually all of his major legislative objectives and said that throughout the talks the Republicans restored or added nearly $6 billion in budget authority sought by the administration.

"We came out of the negotiations funding our priorities and paying for them," Lew said.

For their part, the Republicans claimed credit for increased spending for defense, education, National Institutes of Health research and veterans health care. They also prevailed in giving local schools more flexibility in spending the funds for hiring more teachers and imposed new abortion restrictions on international family planning groups. And Republicans contend they struck an important blow for fiscal prudence, by forcing the administration to offset all additional spending and making it difficult for either party in the future to use any of the Social Security surplus.

House Speaker J. Dennis Hastert (R-Ill.) said in a speech yesterday that the GOP had successfully promoted its goals of a stronger defense, educational reform, protecting Social Security and promoting economic security and fairness by paying down the federal debt.

In the same year that the Senate conducted an impeachment trial of the president, Hastert said the Congress "made progress in putting that bitterness behind us because we decided to go to work."

While House leaders easily rode out Democratic delaying tactics to pass the budget, 296 to 135, Senate leaders were given a scare late Thursday when senators from Wisconsin and Minnesota, major dairy states, threatened to block passage of the bill and even temporarily shut down the government.

At issue is the nation's convoluted system for setting milk prices. The Agriculture Department proffered modest market-oriented dairy reforms, but Lott and Hastert added language to the budget undoing the new rules and largely preserving the Depression-era "Eau Claire system" that sets milk prices according to distance from Eau Claire, Wis. They also agreed to a two-year extension of the controversial Northeast Dairy Compact, a regional milk cartel that sets prices even higher in New England.

The maneuver, which was done on behalf of Sen. Jeffords and other New England lawmakers who face reelection in 2000, was a bitter pill for dairy farmers in the upper Midwest.

Kohl complained that he and other midwestern senators were being railroaded, without being given a chance to adequately vent their concern about the move. Sen. Rod Grams (R-Minn.), who faces a tough reelection campaign, complained that, "They're stepping on the necks of our dairy farmers and it's just not fair."