The Democrats refused to budge and Donald Trump was forced into an embarrassing retreat

President Donald Trump indicated Tuesday he will climb down over his threat to shut the government even if he doesn't get all the money he has demanded for building walls along the US-Mexican border.

Although Trump left enough wiggle room to keep the country guessing, he appeared to be edging toward accepting a deal struck in Congress that would give him significantly less money for the wall.

"I can't say I'm happy, I can't say I'm thrilled," Trump said. But he also told a cabinet meeting in the White House: "I don't think you're going to see a shutdown."

He was responding to a deal struck by Republican and Democratic lawmakers to offer nearly $1.4 billion for wall construction, as well as other border security measures.

This was far less than the $5.7 billion Trump wanted, but it was presented as a workable deal to satisfy both sides and allow Trump to shelve his threat to shut down swaths of government on Friday. Trump said he would manage to "add" to the congressional funds, though he did not explain how.

Lawmakers, including from his own Republican Party, pressured Trump to take what was on the table.

Senator Richard Shelby, the top Republican negotiator, called it "a pretty good deal."

Democratic Senator Patrick Leahy said the compromise would be voted on and likely passed, ready for Trump's signature.

"The deal is the way it's going to be written, and it will be filed, I suspect, tomorrow night," he said.

Border dispute

The funds would finance 55 miles (88.5 kilometers) of new walls along the border.

Hundreds of miles of barriers already run along the US-Mexican border but Trump says far more are needed to bring what he often calls an "invasion" of migrant criminals under control. Democrats say Trump vastly exaggerates the crime problem and uses the issue to whip up his right-wing voter base.

In December, Trump tried to pressure Congress into approving the $5.7 billion by refusing to sign off on funding swaths of government that have nothing to do with the wall, putting 800,000 jobs, from FBI agents to airport security, on hold for five weeks.

The Democrats refused to budge and Trump was forced into an embarrassing retreat, allowing new negotiations to open with a new deadline of this Friday.

This time Republicans appear desperate to avoid a second shutdown, leaving Trump with less political cover.

Republican Senate Majority Leader Mitch McConnell said the compromise deal was "certainly good news."

Election ploy

Although there's little doubt that organized Mexican drug crime and people smugglers present a threat along the US border, Trump's fixation on wall building has polarized Americans to the point where the left and right can barely discuss the issue.

For Trump, chants of "build the wall" were crucial to his surprise 2016 election victory. At a rally in El Paso, Texas, on Monday he introduced a new slogan for his coming 2020 reelection bid: "Finish the wall."

The thousands of devoted Trump fans, many of them wearing his red "Make America great again" campaign hats, cheered at the dire warnings about Mexican criminals and calls for bigger and longer walls.

"Walls save lives, walls save tremendous numbers of lives," Trump told them.

There was a counter-message a short distance from where Trump spoke when rising Democratic star Beto O'Rourke -- a possible challenger in 2020 -- held his own rally.

A former congressman who excited grassroots Democrats last November with an against-the-odds near upset of Republican Senator Ted Cruz, O'Rourke is from El Paso.

"Tonight, we will meet lies and hate with the truth and a positive, inclusive, ambitious vision for the future from the US-Mexico border," he said.

Trump dismissed O'Rourke as "a young man who's got very little going for himself except he's got a great first name."

Making fun of what he said was O'Rourke's much smaller crowd, Trump said: "That may be the end of his presidential bid."