WASHINGTON – State unemployment agencies are gearing up to resume sending payments to millions of people as Congress moves to ship President Obama a measure to restore lapsed benefits.

After months of increasingly bitter stalemate, the Senate passed the measure Wednesday by a 59-39 vote. Obama is poised to sign the measure into law after a final House vote today.

It’s a welcome relief to 2.5 million people who have been out of work for six months or more and have seen their benefits lapse.

Under best-case scenarios, unemployed people who have been denied jobless benefits because of a partisan Senate standoff over renewing them can expect retroactive payments as early as next week in some states. In other states, it will take longer.

The Senate continued debating the measure a full day after a Republican filibuster was defeated by a 60-40 vote. Senate rules required 30 hours of debate, but missing no opportunity to seize a political edge, Democrats attacked Republicans for not waiving the rules and requiring an additional day of debate.

“Republicans are declaring an all-out war on unemployed Americans,” said Jim Manley, spokesman for Senate Majority Leader Harry Reid, D-Nev. “Even though Democrats have the votes to give unemployed workers the safety net they deserve, Republicans are callously delaying the vote for an entire day.”

The measure could have been passed months ago had Democrats not insisted on coupling it with a host of other, more controversial legislation, such as tax increases on hedge fund managers and on some small businesses that were used to renew a popular package of tax breaks for individuals and businesses.

The resulting delays required two temporary unemployment insurance extensions. One came only after a lapse in coverage because Reid adjourned the Senate for Easter recess rather than engage in a time-consuming battle with Republicans. Benefits were restored retroactively.