Republican and Democratic lawmakers in Washington reached a tentative deal Monday to avoid another government shutdown — a pact that includes only one-quarter of President Trump’s requested funding for a border wall.

The agreement expected to include $1.4 billion in appropriations for the wall, far short of the $5.7 billion Trump has demanded in the past, a senior congressional aide told The Post.

It would fund the government until Sept. 30, the end of the current fiscal year.

“We reached an agreement in principle,” said Senate Appropriations Committee Chairman Richard Shelby (R-Ala.).

Noting that the deadline was this Friday, he added, “The specter of another shutdown this close, what brought us back together I thought tonight was we didn’t want that to happen.”

The deal would allow 55 miles of new fencing on the border, which would be constructed out of existing material, such as metal slats.

The fencing, which would be constructed in the Rio Grande Valley in Texas, is far less than the 215 miles Trump demanded during the last government shutdown.

The specifics of the deal will be released Tuesday.

“Our staffs are just working out the details,” added House Appropriations Committee Chairwoman Nita Lowey (D-Westchester, Rockland).

Trump must sign off on any agreement to avoid the second shutdown in the past month. The first one lasted a record 35 days, from Dec. 22 to Jan. 25.

Shelby was confident the White House would back the deal.

“We believe from our dealings with them and the latitude they’ve given us, they will support it. We certainly hope so,” he said.

Talks between the parties crashed over the weekend, in part because Democrats sought to limit the number of immigrant detentions by federal authorities.

They yielded ground on that Monday — dropping the proposal to cap at 16,500 the number of undocumented detainees caught in areas away from the border.

In exchange, the agreement curbed funding for ICE detention beds, which Democrats said would mean the agency would detain fewer people.

But President Trump warned Monday night that lowering detention space would mean “cutting loose dangerous criminals into our country” — putting a question mark as to whether he would approve it.

“Let me state very clearly to those pushing this ridiculous and radical agenda: I will never sign a bill that forces the mass release of violent criminals into our country,” he said during a campaign rally in Texas Monday night.

Trump was speaking at the El Paso County Coliseum, where he was greeted enthusiastically by a crowd of more than 6,500.

“They said that progress is being made with this committee,” Trump said of the talks that were taking place on Capitol Hill.

“Just so you know, we’re building the wall anyway.”

Trump also faced backlash from local leaders in El Paso since his claims that the city once had “extremely high rates of violent crime” and was one of the “most dangerous cities” before a wall was built there.

FBI statistics show that violent crime spiked in El Paso in 1993, but dropped dramatically by 60 percent in 2006 — two years before the wall was constructed. Crime rates have stayed relatively flat since then.

But Trump stood by his statements that walls have made an impact in El Paso.

“They are full of crap when they say it hasn’t made a big difference,” Trump said about the mayor of El Paso and others who criticized his comments.

Trump focused his rally on the 2020 campaign with an update of his “Build the Wall” pledge — instead showcasing banners that read “Finish the Wall.”

“Today we started a big beautiful wall right on the Rio Grande—right smack on the Rio Grande,” Trump said.