Lawmakers reached a tentative deal to avert another government shutdown, with the two sides agreeing to $1.375 billion in funding for President Donald Trump’s long-promised border wall, a far cry from the $5.7 billion he previously demanded.

To prevent a shutdown by the Friday, Feb. 15 deadline, both the House and Senate must approve the deal, and Trump must sign it by midnight Friday.

There is no guarantee yet that Trump will sign the bill.

The provisional deal provides $1.375 billion — just less than a quarter of what Trump was asking for — set aside for “border fortifications” made of steel slats, rather than a concrete or solid wall.

The amount agreed to allows for 55 miles of border barriers to be built. The White House previously demanded money for 215 miles.

Democrats also dropped their proposal to limit the number of immigrants detained by ICE to a daily average of 16,500, which was adamantly opposed by Republicans. There is no such limit currently in place.

The two sides also agreed to fund 40,520 beds to detain immigrants entering the U.S. illegally, a reduction from the current amount of about 49,000.

Full details of the agreement won’t be released until later this week.

The two parties say they wanted to avoid another shutdown, the first of which set a record for length at 35 days, a full two weeks longer than the previous record, and left 800,000 federal workers either furloughed or working without pay.

“With the government being shut down, the specter of another shutdown this close, what brought us back together, I thought tonight, was we didn’t want that to happen,” Sen. Richard Shelby, R-Ala., said in an interview with the Associated Press.

Shelby also said the White House was consulted throughout the process. When asked if he thought Trump will support the deal, he said: “We certainly hope so.”

If Trump decides not to sign the deal, he could declare a national emergency to avoid another shutdown, though, that would certainly be challenged in court. Democrats and some Republicans are against declaring a national emergency.

[totalpoll id=”8652″]