WASHINGTON — The Senate on Wednesday cleared the way for a $26 billion package of aid to states and school districts, and the House speaker, Nancy Pelosi, said she would summon members from their summer recess to grant final approval to the bill.

The measure had been hung up by partisan wrangling between Democrats, who said it was necessary to avert layoffs of teachers and cutbacks in services by strapped states, and Republicans, who objected to another round of government spending and characterized it as a political payoff to unions.

The procedural vote in the Senate was 61 to 38, with the Maine Republicans, Susan Collins and Olympia J. Snowe, joining Democrats in support of ending debate. The Senate is set for a final vote on Thursday before adjourning for its recess.

The vote quickly prompted calls for the House, which adjourned last Friday, to return to Washington. And in a Twitter message Wednesday, Ms. Pelosi said lawmakers would reconvene next week to approve the bill and send it to President Obama.