House Democrats passed a $26 billion economic aid package for states and localities they said would keep 300,000 teachers from losing their jobs.
The Senate has already passed the legislation so it now goes to President Barack Obama for his signature.
Republican critics called the spending an election-year give-away to the teachers' unions who are among some of the Democratic Party's biggest supporters.
Republicans also expressed doubts that the spending would do anything for the economy, citing the alleged ineffectiveness of last year's federal stimulus of nearly $1 trillion. Republicans made it clear that they would target Democrats in Republican-leaning districts who voted for the measure.
For their part, Democrats tried to show a measure of fiscal responsibility by paying for the spending by shifting money away from food stamps and closing some corporate tax loopholes.