The Senate on Thursday passed a $26 billion state aid bill, sending it to the House for a final vote next week when it returns abruptly from August recess for a rare special session.

The legislation, which contains $16.1 billion in Medicaid funding for states with budget holes and establishes a $10 billion Education Jobs Fund, passed 61-39. GOP Sens. Olympia Snowe (Maine) and Susan CollinsSusan CollinsSenate braces for fallout over Supreme Court fight Overnight Finance: WH wants to slash billions | Border wall funding likely on hold | Wells Fargo to pay 0M over unauthorized accounts | Dems debate revamping consumer board Lawmakers call for pilot program to test for energy sector vulnerabilities MORE (Maine) helped Democrats break a filibuster Wednesday, clearing the way for Thursday's final vote.

After the Senate voted to end debate on the measure, setting up the final vote, House leaders scrambled to recall the House to hold a final vote on the legislation and send it to President Obama for his signature.

Democrats faced pressure to finish work on the bill before the end of this month, when states could have laid off thousands of teachers before the beginning of the school year. 

But the special session has caused logistical problems for House lawmakers who have already departed Washington for August recess and the kickoff of campaign season.

The House is scheduled to vote on the bill Tuesday.