WASHINGTON — State unemployment agencies are gearing up to resume sending unemployment payments to millions of people as Congress moves to ship President Barack 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 on Thursday.

Republicans say they support the benefits extension but insist any benefits be financed by cuts to programs elsewhere in the $3.7 trillion federal budget. Maine GOP moderates Olympia Snowe and Susan Collins were the only Republicans to support the bill Wednesday.

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.

State unemployment and labor agencies have been preparing for weeks for Congress to restore jobless payments averaging $309 a week for almost 5 million people whose 26 weeks of state benefits have run out. Those people are enrolled in a federally financed program providing up to 73 additional weeks of unemployment benefits.

About half of those eligible have had their benefits cut off since funding expired June 2. They are eligible for lump sum retroactive payments that are typically delivered directly to their bank accounts or credited to state-issued debit cards.

In states such as Pennsylvania and New York, the back payments should go out next week, officials said. In others, such as Nevada, it may take a few weeks for all of those eligible to receive benefits, said Mae Worthey, a spokesman for the Department of Employment, Training and Rehabilitation.

In North Carolina, Employment and Income Department spokesman Andrew James says to expect a wait of two to six weeks.

The Senate continued debating the measure a full day after a GOP 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 them and requiring an additional day of debate.

“Republicans are declaring an all-out war on unemployed Americans,” said Jim Manley, spokesman for 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.”

In fact, 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 pay 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 its two-week Easter recess rather than engage in a time-consuming battle with Republicans. Benefits were restored retroactively.

Democrats have become more aggressive in attacking the GOP for opposing the measure, which has been stripped down so that it’s essentially limited to a $34 billion, six-month renewal of unemployment insurance for the chronically jobless.

Sen. Ben Nelson of Nebraska was the only Democrat to break with his party to oppose the bill.

Many Republicans have voted in the past for deficit-financed benefits extension, including as recently as March and twice in 2008, during the Bush administration. But now they are casting themselves as opposing out-of-control budget deficits, a stand that’s popular with their core conservative supporters and tea party activists whose support they’re courting in hopes of retaking control of Congress.

Democrats tout the economy-boosting effect of unemployment checks since most beneficiaries spend them immediately, and they say that paying for them with cuts to other programs dilutes the stimulative effect.

“Extending unemployment insurance isn’t just the right thing to do. It’s also the smart thing to do for our economy,” said Sherrod Brown, D-Ohio.

But a proposal by Sen. Tom Coburn, R-Okla., to spread the spending cuts over the upcoming decade garnered 54 votes — including 14 Democrats — only to fail because Reid had placed Coburn in a parliamentary situation requiring a two-thirds supermajority to prevail.

Economists say the measure likely will have a modest beneficial effect on the economy. It represents less than one-quarter of 1 percent of the size of the $14.6 trillion economy, and is far smaller than last year’s $862 billion stimulus legislation. Republicans have blocked Democratic add-ons, such as aid to state governments, that could have meant a greater economic boost.