The House voted near midnight to send the bill to President Barack Obama after a frantic day of political brinksmanship on Capitol Hill.
In morning trading benchmark crude for February delivery rose $1.14 to $92.96 a barrel on the New York Mercantile Exchange. Oil followed the stock market higher, where major indexes were up about 2 percent.
Economists had warned that if Congress did not take action, a series of tax increases and spending cuts due to automatically start this year could have pushed the U.S. into recession. A spike in unemployment and less consumer spending would likely depress energy demand.
Some House Republicans at first opposed the bill, which drops middle-class tax increases and $24 billion in spending cuts set to take effect over the next two months, while raising taxes on the wealthy. They called for more spending cuts but eventually agreed to a simple yes-or-no vote on the bill, which had already passed the Senate by a wide margin.
But the nation's budget problems are far from over. There are still many more hurdles to cross, including a new deadline for spending cuts in two months. Oil analyst Phil Flynn says in the meantime, "ignorance is bliss and this deal should propel oil...near $96 a barrel."
Brent crude, used to price various kinds of international oil, was up 96 cents to $112.07 a barrel on the ICE Futures exchange in London.
In other energy futures trading on the New York Mercantile Exchange:
— Wholesale gasoline rose 3 cents to $2.79 a gallon.
— Heating oil added a penny to $3.04 a gallon.
— Natural gas fell 15 cents to $3.21 per 1,000 cubic feet.