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

Rep. Nita LoweyNita Sue LoweyHouse approves bill increasing federal worker pay House Democrats unveil changes to border bill to win over progressives Congress unlikely to reach deal on Trump border bill before break MORE (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 TrumpDonald John Trump2020 Democrats spar over socialism ahead of first debate Senate passes .5 billion border bill, setting up fight with House 'Teflon Don' avoids the scorn of the 'family values' GOP — again MORE has demanded.

ADVERTISEMENT

With the tight time frame, the Senate is expected to 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 CornynJohn CornynSenate passes .5 billion border bill, setting up fight with House 2020 debates complicate Senate plans for vote on Trump's war authority Senate GOP to defeat proposal requiring approval for Iran attack MORE (R-Texas), who traveled back from El Paso, Texas, with Trump earlier this week.

Sen. Richard ShelbyRichard Craig ShelbyAlabama secretary of state announces Senate bid House approves 3 billion spending package This week: Congress set for clash on Trump's border request MORE (R-Ala.), chairman of the Appropriations Committee, added in a tweet Wednesday evening that he had spoken with Trump recently, characterizing the president as being in "good spirits." 

Rep. Tom GravesJohn (Tom) Thomas GravesBipartisan bill would enable companies to defend themselves against cyberattacks Republicans spend more than million at Trump properties Congressional panel calls for lobbying disclosure reforms MORE (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 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 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 MerkleyJeffrey (Jeff) Alan MerkleySenate set to bypass Iran fight amid growing tensions Congress unlikely to reach deal on Trump border bill before break Chaos within the EPA exposes Americans to toxins like asbestos MORE (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 at 1 a.m.