President Donald Trump on Tuesday signed into law a massive funding package to end the brief government shutdown that began Saturday.

The bill passed the House earlier Tuesday on a vote of 217-214. It passed the Senate last week.

The legislation will ensure full-year funding for the federal government through the end of September, with the lone exception of the Department of Homeland Security, which is put on a two-week leash as Democrats insist on changes after federal agents fatally shot two Americans in Minneapolis.

The measure tees up a frantic 10-day window for Congress to negotiate a DHS funding agreement as Democrats demand reforms to rein in Immigration and Customs Enforcement and Customs and Border Protection.

The new deadline when DHS funding will expire is Feb. 13.

Earlier in the day, House Republicans voted 217-215 to advance the legislation, a procedural motion for which Democrats provided no help.

A vote on the bill was delayed by one day after Democrats privately indicated they wouldn’t provide the large number of votes needed to fast-track it on Monday.

The procedural “rule” vote provided some drama as the House GOP’s one-vote margin showed its challenges. It was held open for an extended period when Rep. John Rose, R-Tenn., unexpectedly joined Rep. Thomas Massie, R-Ky., in voting against it. Massie has held his ground against spending bills and was seen as all but impossible to flip. Rose, who complained that the Senate wasn’t doing enough to pass the SAVE Act, which mandates proof of citizenship to vote, eventually flipped to “yes.”

Rep. Rosa DeLauro, D-Conn., the party’s lead funding negotiator in the House, was among the Democrats who voted for the bill. House Minority Leader Hakeem Jeffries, D-N.Y., and Minority Whip Katherine Clark, D-Mass., voted against it.

DeLauro made the case for the bill to her colleagues before the vote, as did other Democrats, she said.

“I believe this is an opportunity to isolate DHS and go at it, hammer and tongs, tooth and nail — whatever phrase you want to use — rather than having to figure out what the heck is going to happen to five other bills and all those departments,” DeLauro said. “There’s unbelievable bipartisan, bicameral support on those bills. So why squander that? And then take the next 10 days, next Friday, and just bring DHS up.”

The deal to punt on DHS funds for two weeks, alongside the other funding bills, was negotiated between Senate Minority Leader Chuck Schumer, D-N.Y., and the White House after the killings of Renee Good and Alex Pretti sparked a national outcry.

House Speaker Mike Johnson, R-La., told reporters that the Trump administration has “engaged in good faith” with Senate Democrats on a final, full-year DHS bill.

“We hope that they will operate in good faith over the next 10 days, as we negotiate this,” he said. “The president, again, has reached out. We are restoring calm in Minnesota, but again, we make the plea and the demand that the governors and the mayors in these blue states and blue cities participate with federal law enforcement so that we have a safer environment in which to implement and to enforce federal immigration laws.”

After the Senate passed the package last Friday by a vote of 71-29, Trump gave it a boost with House Republicans by calling on lawmakers to pass it as written, stamping out demands by some in the party to make changes.

Securing a bipartisan deal on DHS money will be a tall order.

Rep. Robert Aderholt, R-Ala., a senior member of the Appropriations Committee, said it will be “very difficult” to secure a DHS funding deal by the next deadline.

“There are vast differences,” he said. “I would expect — and I’m hearing that there could be just another, we kick the can down the road a little bit longer until those differences can be worked out … at least, probably, March 1.”