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 Margaret CollinsSenate Gang of Four to meet next week on immigration Republicans agree — it’s only a matter of time for Scott Pruitt Skyrocketing insulin prices provoke new outrage 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.