Republicans and Democrats are increasingly hopeful they can strike a border security deal to avert a fresh US government shutdown, with the GOP’s top negotiator saying he believes Donald Trump would back the emerging consensus.

Participants in cross-party talks believe a handshake on the agreement may still be several days away, especially given the president’s propensity to change his mind abruptly.

However, it is thought a deal would include physical barriers on the US’s southwest border with Mexico, but would provide significantly less than the $5.7bn (£4.4bn) funding Mr Trump initially demanded for his signature wall project, offering closer to $1.6bn (£1.2bn)

“The president was urging me to try to conclude these negotiations and this is the most positive meeting I’ve had in a long time,” lead GOP negotiator senator Richard Shelby told reporters after discussing the potential deal with the president in the Oval Office.

“I gathered today that if we work this out in the context that we were talking today, that I thought was reasonable, very reasonable, that he would sign it.”

Video: Trump Quiet On Border Emergency Declaration (For Now)

For more news videos visit Yahoo View.

Congress has until 15 February to approve an agreement before the government runs out of money.

Mr Trump had declared a cease-fire on 24 January following a historic 35-day shutdown, sparked when congress refused to sign-off on a government spending plan with billions ring-fenced for the president’s border wall.

The dispute, the longest of its kind in US history, saw 800,000 federal workers either furloughed or expected to work for free, with most missing two pay-slips in the process.

Mr Trump has been non-committal over the latest negotiations to bring the brusing dispute to a close.

“I certainly hear that they are working on something and both sides are moving along. We'll see what happens,” he said. “We need border security. We have to have it, it's not an option.”

Story continues

However, speaking on the condition of anonymity, a senior administration official said the White House is “cautiously optimistic” about getting a deal they could support.

Members of both parties have expressed opposition to Mr Trump bypassing congress by declaring a national emergency at the border, a move that would almost certainly prompt a legal challenge.

It was unclear what language the evolving pact would use to describe the barriers, with Democrats vowing repeatedly to block funding for a “wall.”

Also unresolved was Democrat demands to reduce the number of beds for detained migrants operated by the federal Immigration and Customs Enforcement (ICE) agency.

Despite progress in recent days, lawmakers on both sides of the house still fear Mr Trump could scupper any potential deal.

Leaders of the two parties previously assumed in December the president would support a bipartisan deal that would have prevented the shutdown, only for him to perform a U-turn after being savaged by conservative media pundits.

“I remember everybody was optimistic the week before Christmas,” said Democratic senator Chris Murphy, adding this time however “It sounds like Trump is closer to reality.”

“There’s a small light at the end of the tunnel,” Republican senator Pat Roberts said: “We just hope it's not a train coming the other way.”

Additional reporting by AP