Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — House Republicans overcame a major obstacle late Thursday when the most conservative wing of the conference announced its support for a short-term spending measure to avoid a government shutdown. The measure passed the House on a mostly party line vote, 230-197.

But the fate of the measure is uncertain in the Senate where at least six Republicans have come out against the measure and Democrats are confident they can block it from advancing.

Senate Democratic Leader Chuck Schumer has proposed a shorter stop-gap measure, lasting just four or five days, to be used as a hard deadline on an agreement on government spending levels and the Deferred Action for Childhood Arrivals program, known as DACA.

On Friday morning, President Donald Trump weighed in, indicating that a shutdown was possible.

"Government Funding Bill past [sic] last night in the House of Representatives. Now Democrats are needed if it is to pass in the Senate — but they want illegal immigration and weak borders," he tweeted. "Shutdown coming? We need more Republican victories in 2018!"

In an animated and rare late-night debate on the Senate floor, Schumer and Republican Senate Majority Leader Mitch McConnell sparred over the legislation, which would extend government funding for four weeks until Feb. 16. The measure would also fund the low-income children's health insurance program, or CHIP, for six years and delay some taxes that are key sources of funding for Obamacare.

McConnell insisted that it's unreasonable to demand an agreement on immigrants when there is no immediate deadline.

"So what our friends on the other side are saying here is they're prepared to shut down the government over the issue of illegal immigration. Now on that issue, there is a bipartisan interest in solving the DACA problem, but the president has given us until March. Last time I looked this was January," McConnell said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But Schumer argued in response that the Senate could reach agreement if an urgent deadline was set.

"Passing a short term continuing resolution ensures that both sides remain at the table and can quickly reach a deal that funds our military, our domestic priorities like the fight against opioids, protects Dreamers, funds health care and aid for those harmed by recent disasters," Schumer said.

A growing number of Republicans came out in the past two days against the GOP spending measure, putting the bill in jeopardy in the Senate and giving Democrats confidence that they can push their position.

Democrats are confident that voters will blame Republicans if the government shuts down as they control both bodies of Congress and the White House.

"We always get blamed even though it's their fault," said Sen. Orrin Hatch, R-Utah.

As Republican support for the bill began to crack, McConnell sent an email to his 50 Republican members blaming Democrats for being “irresponsible” in their threats to vote against the stopgap bill and urging his colleagues not to join them.

“This is an irresponsible position to take as everything from pay for our military to processing social security checks will be affected. I hope not a single Republican is inclined to join them,” McConnell wrote. “I know we are all frustrated by the pace of negotiations on spending, but joining Democrats to shut down the government plays right into the Democrats' hand.

"We are strongest when we stick together — that will produce the best spending deal and the best DACA deal — one that has a chance of being enacted into law,” he continued.

If passed, the measure would be the fourth short-term spending bill since the fiscal year began in October, and some Republicans are pushing for longer-term planning.

Sen. Lindsey Graham, R-S.C., is one of those senators who said he’d oppose the spending measure.

“I think we’re not going to get a (continuing resolution) through the Congress until we have a pathway forward to increase defense spending, deal with immigration, CHIP and everything else,” Graham said.

Earlier in the day, Trump caused confusion over the bill when he tweeted that the CHIP extension should not be included in a short-term measure, throwing the whole effort into doubt. The White House later clarified the president's comments, saying that he supports the continuing resolution being proposed in the House.

Many Democrats have said they want a deal on the fate of so-called Dreamers — young immigrants brought to the U.S. illegally as children — whose protection from deportation expires in March, before they support another spending bill. Leaders of both parties in the House and the Senate continue to meet to discuss a path forward on the program, but a deal by Friday seems unlikely.

The bill's passage in the House was secured late Thursday when Rep. Mark Meadows, R-N.C., chairman of the House Freedom Caucus, announced his support for the legislation after securing promises from GOP leaders on conservative-backed measures involving immigration and the military.

The majority of the @freedomcaucus has taken a vote to support the CR effort this evening — House Freedom Caucus (@freedomcaucus) January 18, 2018

The Freedom Caucus members were the final holdouts putting the measure in jeopardy. The White House had been pressuring Meadows and the Freedom Caucus to come on board, including one more last-ditch call by Trump to Meadows Thursday afternoon. That call, combined with House Speaker Paul Ryan's last-minute promises to hold votes on increasing military spending by $80 billion and on a conservative immigration bill if enough support to pass it is obtained, appeared enough to persuade Meadows.

After the House vote, Ryan called on Senate Democrats who want a deal on DACA to act.

"Senate Democrats are treating their men and women in the military as a bargaining chip," Ryan said.