President Obama signed legislation Thursday extending jobless benefits to 2.5 million unemployed Americans, ending a long partisan battle. The House passed the measure earlier Thursday, a day after the Senate did.

The law extends unemployment insurance through November for out-of-work Americans who have not yet exhausted up to 99 weeks of aid. Benefits would be retroactive to late May, when the previous extension expired. Jobless benefits vary from state to state but typically expire after 26 weeks.

A Republican filibuster held up the bill until two Maine senators crossed party lines to end the debate. Most Republicans contended that the $33.9-billion measure should be paid for with spending cuts rather than tacked onto the national debt. Democrats said the 9.5% national jobless rate was an emergency and thus exempt from budget-offset requirements.