WASHINGTON – The Senate passed a spending bill Friday that would avert a government shutdown in three days, stripping out a Republican measure to defund ObamaCare and tossing the bill back into the lap of the GOP-run House.

The threat of a government shutdown still looms, with House Speaker John Boehner (R-Ohio) vowing to amend the bill with another swipe at ObamaCare and send it back to the Democrat-run Senate.

The Senate restored ObamaCare funding after overcoming stalling tactics led by Tea Party champion Sen. Cruz (R-Texas), including a 21-hour filibuster.

The lengthy debate over the bill ended in a 79-19 vote, easily clearing a 60-vote requirement that was last chance for Republicans to stop the bill.

Cruz garnered support from 18 of the chamber’s 45 Republicans in trying to block the bill.

The Democratic majority then forced though an amendment restoring funding for ObamaCare and final passage of the bill in two party-line votes.

Senate Majority Leader Harry Reid said the shutdown showdown was caused by “extremists” and “anarchists” who he said had hijacked the Republican Party, an apparent reference to Cruz and fellow conservative Sen. Mike Lee (R-Utah).

“The Republican Party has been infected by a small but destructive faction that would rather tear down the house our founders built than govern from it,” Reid said before the vote.

“These extremists are more interested in putting on a show, as one Republican colleague put it, than in legislating.”

Alabama Sen. Jeff Sessions, the top Republican on the Senate Budget Committee, blamed Democrats who he said had “built a fortress around ObamaCare” and refused to fix the unpopular law.

“The House and Senator Cruz and Republicans … are tying to force this Congress to confront the obvious flaws in that legislation,” he said.

The House is not expected to act on the bill until Saturday or Sunday.

That will leave just one or two days for the two chambers to resolve their difference and get a bill to President Obama before the midnight Monday deadline.

The deadline coincides with the start of the biggest piece of ObamaCare – the online marketplaces for government-subsidized health insurance that open Tuesday.

Congress also is running up against an Oct. 17 deadline to increase the US debt limit or else risk default.

House Republicans plan to use the debt limit bill to again assault ObamaCare.

Tea Party conservatives who dominate the House Republican conference remain adamant that a change to ObamaCare must be included in the spending bill.

They likely will settle for something less than completely defunding it, such as repealing the law’s unpopular medical device tax.

“We still have three days. The president and the Senate will have to negotiate,” said Tea Party Republican Rep. Andy Harris of Maryland.

The House likely will pass a super-short spending bill, perhaps funding the government for one week, if a deal can’t be reached by Monday, said lawmakers.

If Congress can’t get the job done in time, government funding runs out at the start of the new fiscal year Tuesday and the government will close down for the first time since 1996.

The shutdown would deliver a blow to the economy and likely jolt the stock market. The nearly month-long shutdown in 1996 cost the government $1.4 billion, according to federal estimates.