In a final burst of activity, lawmakers approved $38 billion in tax breaks and a Vietnam trade measure and voted to open a large section of the Gulf of Mexico to oil and gas drilling.
The House approved the measures Thursday night, and the Senate followed suit after midnight as the lame-duck session wound down.
But the GOP leadership was almost denied its last legislative victories, not by Democrats but by Republicans.
Some Senate Republicans objected to costly provisions of the tax bill, from a tax break for songwriters to funding for health benefits for former coal miners, saying they showed the party had yet to learn the lessons of the election that ousted it from power.
"The American people took the reins of government away from the Republican Party ... because they were tired of our hypocrisy as a party on the issue of fiscal discipline," Senate Budget Committee Chairman Judd Gregg (R-N.H.) protested.
Sen. Charles E. Grassley (R-Iowa) warned colleagues that if they left town without renewing expired or expiring tax breaks, millions of taxpayers would face tax increases.
"I never thought I'd hear a Republican advocating that we ought to have a tax increase," said Grassley, who is chairman of the tax-writing Senate Finance Committee.
The final hours of the lame-duck session were overshadowed by the release of an investigative report on the congressional page scandal -- perhaps fitting, given that the 109th Congress may well be remembered for its political scandals.
The day was marked by partisan bickering. Democrats complained that Republicans were rushing through big and complex bills without giving lawmakers time to read them.
In a speech on the House floor, Hastert looked back on the GOP legacy and wished his Democratic successor well. Pelosi saluted the longest-serving Republican speaker and then joked "long may that record stand."
The tax bill that passed the House, 367-45, included a provision that would open to exploration about 8.3 million acres in the Gulf of Mexico, an area thought to contain more than 1.2 billion barrels of oil and 5.8 trillion cubic feet of natural gas.
Rep. Lois Capps (D-Santa Barbara), who opposed the drilling provision, warned that it would "bring the 25-year-old bipartisan moratorium against new drilling off America's coasts one step closer to an end."
But Rep. K. Michael Conaway (R-Texas), who supported the provision, argued that it would lead to "greater economic and national security."
The bill includes renewal of a number of popular tax breaks, including the research-and-development credit important to California's high-tech industry.
Lawmakers worked several healthcare measures into the tax bill, including legislation to cancel a scheduled 5% cut in payments to doctors who treat elderly Medicare recipients, and changes that would allow individuals to put more money into tax-sheltered health savings accounts, a new type of medical insurance favored by many Republicans.
Separately, the tax bill also addressed some unintended consequences of legislation that Congress passed last year to keep illegal immigrants from getting healthcare benefits through the Medicaid program for the poor. Hundreds of thousands of people who were legally entitled to benefits were inadvertently subjected to new requirements that they provide documents proving their citizenship. Some were frail seniors who had never been issued a birth certificate.
The changes will exempt several groups from the documentation rule, including federally assisted foster children, certain disabled people waiting for the starting date of their Medicare coverage and individuals receiving low-income Social Security assistance.
Rolling back the scheduled cut in doctors' fees had widespread bipartisan support. The cut had been called for under a budget formula that Congress had waived in past years. With time running out on the 109th Congress, the American Medical Assn. mounted an all-out lobbying campaign to head off the cuts.
Lawmakers instead agreed to freeze payments at this year's levels, while providing a modest increase for doctors who agree to participate in a new Medicare effort to improve the quality of clinical care.
However, Democrats bitterly criticized the provisions that would expand health-savings accounts. Many individuals use the tax-sheltered accounts to pay for routine bills while carrying low-cost "catastrophic" insurance for major medical problems.
Under the legislation, individuals would be able to contribute more money to the accounts, known as HSAs, and roll over limited amounts from Individual Retirement Accounts and other sources.
Some Democrats say the accounts provide a way for upper-income individuals to shelter more of their wealth from taxes and could undermine traditional insurance.
The trade bill, which included a Bush-backed provision establishing normal trade relations with Vietnam, passed the House, 212-184.
But the bill drew objections from Republican senators from Southern textile states because of a provision that would allow Haiti to export more apparel to the U.S.
Rep. Zoe Lofgren (D-San Jose) opposed the bill, saying it "does not do anything" to improve human rights conditions in Vietnam.
But Ways and Means Committee Chairman Bill Thomas (R-Bakersfield), who helped draft the bill, said it represented a "significant milestone in our efforts to mend the wounds of one of the most divisive conflicts in our nation's history."
The tax and trade bills were combined into a single package after they left the House and won Senate approval on a vote of 79 to 9.
In a sign of the Democrats' new clout, the House and Senate voted to put off until at least Feb. 16 a congressional pay raise scheduled to take effect Jan. 1. Currently, rank-and-file lawmakers receive $165,200 a year.
Pelosi had said that lawmakers should not receive a pay raise until Congress votes to raise the federal minimum wage, set at $5.15 an hour since 1997.
The provision was contained in a stopgap measure funding the government through Feb. 15. That measure is necessary because Congress has yet to enact most of the spending bills for the fiscal year that began Oct. 1.
A number of Republicans described the mood among their members as somber.
Complaining about the raft of unfinished business, Rep. Jack Kingston (R-Ga.) said, "We're quietly going out of town on a bunt rather than a grand slam."
But Democrats were just as eager for the session to wrap up.
"Enough of this Congress," said Rep. Henry A. Waxman (D-Los Angeles). "I've had it."
Times staff writer Ricardo Alonso-Zaldivar contributed to this report.