Republican congressional leaders are struggling to separate the immigration blow-up set off by President Trump from a funding bill to avert a U.S. government shutdown at the end of this week.

Democrats say the burden is on Trump to help break the stalemate after he rejected a bipartisan proposal to shield young, undocumented immigrants from deportation and ignited outrage by reportedly disparaging Haiti and African nations as “shithole countries.” Democrats want to attach such an immigration measure to the must-pass spending bill, an idea House Speaker Paul Ryan, R-Wis., and Senate Majority Leader Mitch McConnell, R-Ky., reject.

“No, we’re not going to do that,” Ryan said Friday during an event in his home state of Wisconsin. “People are attaching these as far as leverage is concerned,” but Republican leaders won’t go along, he said.

Government funding runs out at the end of the day Friday, and Republican leaders are weighing another short-term measure that would extend it until Feb. 16, a person familiar with the negotiations said.

On Tuesday, Trump blamed Democrats in Twitter postings. “The Democrats want to shut down the Government over Amnesty for all and Border Security,” he wrote. In another tweet, he said, “We must have Security at our VERY DANGEROUS SOUTHERN BORDER, and we must have a great WALL to help protect us, and to help stop the massive inflow of drugs pouring into our country!”

Both parties have struggled for months to agree on a spending deal for the rest of the fiscal year that began Oct. 1, and Congress already has had to pass three short-term funding bills. Democrats want to use the next attempt to keep government operations funded as a vehicle for other bills to provide disaster-relief funds, shore up Obamacare, extend the Children’s Health Insurance Program, and protect young immigrants brought to the U.S. illegally as children. A dispute over how much to allocate to defense and domestic programs also has been an obstacle to a broader fiscal agreement.

Republican leaders don’t expect to have enough time to write a fiscal year spending bill even if they get a breakthrough in negotiations this week, according to the person, who asked for anonymity because the talks are private.

Senate Democratic leader Charles Schumer, D-N.Y., will have to decide whether this is the moment to force a showdown on immigration that results in a partial government shutdown in an election year.

Republicans’ slim 51-49 Senate majority means they need at least nine Democratic votes to pass a spending bill. Republicans are counting on support from some Democrats, including from among the 10 who are up for election in November in states won by Trump.

Sen. Joe Manchin, D-W.Va., who is on the ballot in November and who voted with Republicans to help keep the government operating with a stop-gap measure in December, said he has little desire to see a shutdown. He said he remains confident that some kind of deal on immigration can be worked out before it comes to that.

“Shame on any of us if we sit here and say, OK, we’re going to let it run out for the sake of politics and shut the government down,” Manchin said Sunday on CBS’s “Face the Nation.” “None of us even should be representing the good states that we represent, such as West Virginia and Colorado and Arkansas, if we allow that to happen.”

Republicans have a wider majority in the House – they hold 239 seats in the chamber and 218 are needed to pass a bill. But even there, Republican leaders are working with a thin margin.

Rep. Carlos Curbelo, R-Fla., who faces a competitive re-election this fall in a district that is heavily Latino, said he won’t vote to extend government spending authority if there isn’t an indication that an immigration deal is near.

“If we don’t have any measurable progress towards a DACA deal I am not going to vote for a stopgap measure, and I’m asking Republicans and Democrats to take that position,” Curbelo said Monday on CNN, referring to the Deferred Action for Childhood Arrivals program, which Trump is ending. “We are in Congress and, regrettably, Congress is an institution that only acts when it’s forced to.”

Meanwhile, some House conservatives, including those in the Freedom Caucus, are threatening to withhold their votes on a stopgap spending bill, known as a continuing resolution, to protest rising spending levels or to force an increase for defense.

“If it’s just a yes or a no on a CR, I would be a no,” said Rep. Warren Davidson, R-Ohio, a Freedom Caucus member. But he said he doubts there will ultimately be a shutdown.

“I don’t know anyone who truly wants the government to shut down,” Davidson said on a conference call with reporters.

Trump has pre-emptively sought to lay the blame on Democrats if there’s no agreement on funding and the government is forced to shutdown over the immigration standoff.

“Honestly, I don’t think the Democrats want to make a deal,” Trump told reporters Sunday at his golf club in Florida, where he was spending the weekend. “I think you have a lot of sticking points, but they’re all Democrat sticking points.”

The immigration talks were set back Thursday when Trump sided with Republican immigration hardliners and rejected a plan negotiated among a small group of Democratic and Republican senators. The proposal, presented by Sens. Dick Durbin, D-Ill., and Lindsey Graham, R-S.C., during an Oval Office meeting with a group of lawmakers, combined border security and immigration-law changes – sought mainly by Republicans – with a measure to permanently shield an estimated 800,000 undocumented immigrants brought to the U.S. as children from deportation.

The furor over the president’s reported remarks about why the U.S. accepts immigrants from “shithole countries” like Haiti, El Salvador and African nationsrather than places like Norway, has hardened positions on both sides. Trump has denied using those exact words, which were confirmed by three people briefed on the exchange.

On Twitter Monday, Trump belittled Durbin, who said the president used “hate-filled, vile and racist” language about immigrants during the Oval Office meeting.

“Senator Dicky Durbin totally misrepresented what was said at the DACA meeting,” Trump tweeted. “Deals can’t get made when there is no trust! Durbin blew DACA and is hurting our Military.”

White House Press Secretary Sarah Sanders on Tuesday defended Trump against accusations of racism, calling them “outrageous” and citing his success as a public figure and star turn on television as a host on NBC’s reality show “The Apprentice.”

“Frankly, if the critics of the president were who he said he was, why did NBC give him a show for a decade on TV,” Sanders said. “Why did they want to be with him for years and years in various activities whether it was events, fundraisers and other things?”

Durbin and Graham are seeking more sponsors for their compromise plan in an attempt to force a vote. When Congress returns Tuesday there will be additional meetings on an immigration measure among a group that includes the No. 2 Republican and Democratic leaders of the House and Senate.

With assistance from Anna Edgerton and Jack Fitzpatrick