By Jordain Carney, The Hill–

Lawmakers introduced a bill late Wednesday night to prevent a second partial shutdown days before the deadline.

Rep. Nita Lowey (D-N.Y.), chairwoman of the House Appropriations Committee, filed the legislation to fund approximately a quarter of the federal government roughly 48 hours before the funding lapse deadline.

“We cannot repeat the disastrous government shutdown, so it is incumbent on Congress to come together to responsibly fund our government. This legislation represents a bipartisan compromise and will keep our government open while funding key priorities,” Lowey said.

The 1,159-page bill includes $1.375 billion for physical barriers along the U.S.-Mexico border – well below the $5.7 billion President Trump has demanded.

With the tight timeframe, the Senate is expected vote first on the funding deal, according to a Senate source. The House is then expected to vote on the agreement on Thursday evening and send it to President Trump’s desk.

Trump has not said explicitly that he will sign the bill, though Republican lawmakers say they are optimistic he’ll back it.

“My impression is he’s likely to sign it but then to issue some sort of executive order to supplement those funds with other funds that Congress has already authorized him to tap,” said Sen. John Cornyn (R-Texas), who traveled back from El Paso, Texas, with Trump earlier this week.

Sen. Richard Shelby (R-Ala.), chairman of the Appropriations Committee, added in a tweetWednesday evening that he had spoken with Trump recently, characterizing the president as being in “good spirits.”

Rep. Tom Graves (R-Ga.) said early Thursday morning that he did not sign the conference report, adding that he was given only an hour to review the 1,159-page bill.

“With 30 minutes notice, I was allowed 1 hour to review and had to make a choice. I could not sign off,” he tweeted shortly after midnight.

Only a simple majority of both House lawmakers and Senate lawmakers on a conference committee need to sign the report.

The funding agreement comes after lawmakers and staffers were still haggling earlier Wednesday about a handful of outstanding issues, including the type of physical barriers that could be used along the border and some of the locations.

A Congressional Democratic aide said the funding bill would only allow the administration to use “existing technologies” for fencing and barriers. The legislation specifies that the barrier funding would have to be “pedestrian fencing” or “levee pedestrian fencing” in the Rio Grande Valley Sector.

It would also prohibit fiscal year 2019 or previous years’ funding from being used to construct pedestrian fencing in the Santa Ana Refuge, La Lomita Historical Park, Bentsen-Rio State Park, National Butterfly Center, the Vista del Mar and other points east.

Back pay for federal contractors impacted by the shutdown and an extension of the Violence Against Women Act (VAWA) were both left out of the bill.

According to a summary of the bill, it would also prohibit the Department of Homeland Security (DHS) from blocking lawmakers from “entering any facility that is used to detain or otherwise house children” or making changes “to the current operations and facility conditions in anticipation of a congressional oversight visit.”

Lawmakers, including Sen. Jeff Merkley (D-Ore.), have previously said they were turned away when trying to enter detention facilities.

Lowey, in a statement submitted on behalf of the conference committee, said that under the bill, DHS is also directed to ensure that migrant families are “reunited and transferred together” before they are removed from U.S. Customs and Border Patrol (CBP) or transferred to Immigration and Customs Enforcement. The bill, according to the statement, would also encourage CBP to detain siblings in the same facility.

– Niv Elis and Scott Wong contributed to this report. Updated 1:00 a.m.