Trump’s remarks, made Tuesday during an Oval Office interview with The Washington Post, are a sign that he could be softening his position on the issue ahead of a Dec. 7 deadline. Trump had previously declared that he was willing to force a partial government shutdown if lawmakers did not agree to the $5 billion figure.

Republicans control both the House and Senate until the new Congress convenes in January.

“We need Democrat votes to have a wall,” Trump said. “Now, if we don’t get it, will I get it done another way? I might get it done another way. There are other potential ways that I can do it. You saw what we did with the military, just coming in with the barbed wire and the fencing, and various other things.”

Trump has deployed roughly 5,800 troops to the U.S. border with Mexico, and more than 12 miles of barbed wire have been set up in recent weeks, including at the San Ysidro crossing, where U.S. border agents on Sunday fired tear gas at Central American migrants attempting to cross into the country from Tijuana.

Images of mothers and children fleeing the tear gas have prompted outrage in recent days. But Trump said he thought he had the political upper hand, suggesting that footage of crowds of migrants rushing the border would sway public opinion against Democrats.

“We desperately need a wall,” Trump said. “I think that’s been shown better than ever in the last short period of two weeks — that we need a wall. I see the Democrats are going to want to do something, because they understand, too. Those pictures are very bad for the Democrats.”

Soldiers carry barbed wire to put up on a border fence near in Brownsville, Tex., on Nov. 11, 2018. (Calla Kessler/The Washington Post)

Democrats and a number of Republicans have balked at the prospect of spending billions of taxpayer dollars on a border wall that Trump pledged during the 2016 campaign and in the early days of his presidency would be paid for by Mexico. He has since dropped that claim and said Congress should fund the barrier.

Earlier this year, Senate Minority Leader Charles E. Schumer (D-N.Y.) agreed to $25 billion for new border security measures in exchange for legal protections for immigrants enrolled in the Deferred Action for Childhood Arrivals program. But Schumer rescinded the offer amid pushback from Democrats who urged him to take a harder line in negotiations with the president.

Trump said Tuesday that “we were very close to having a deal” and predicted that the fate of DACA, which his administration has unsuccessfully sought to end, would ultimately be decided by the Supreme Court.

“The Democrats never thought they were going to win that, and then you had another couple judges rule, and then you had judges rule the other way,” Trump said, referring to rulings by courts around the country. “It’s going to be settled, I assume, in the Supreme Court.”

Senate Majority Leader Mitch McConnell (R-Ky.) said Tuesday that negotiations with Democrats as well as the administration on the issue of border wall funding were ongoing and that “we’re trying to get the president the money he would like for the wall.”

Senate Democrats, meanwhile, held to their support for a bipartisan $1.6 billion deal agreed to earlier this year.

House Republican leaders sought to increase the pressure on Democrats to agree to more funding, pointing to the recent clash between migrants and Border Patrol officers.

“The real question is, do Democrats want to shut the government down over whether or not to keep America safe? That’s a serious question they’re going to have to ask at a time when there are people attacking our own law enforcement agents at the border,” said House Majority Whip Steve Scalise (R-La.), who met with Trump on Tuesday afternoon along with other House Republican leaders.

House Majority Leader Kevin McCarthy (R-Calif.), who also attended the meeting with Trump, told reporters that the president was “very solid with where he wants to go” on the funding.

“It’s the way our government works that you have to find compromise,” McCarthy said. “And I think what the president’s saying [with] $5 billion, he’s finding compromise there. But we need that to secure the border.”

Erica Werner contributed to this report. Correction: An earlier version of this story inaccurately said President Trump was considering the use of razor wire at the border. The president referred to barbed wire, and the story has been corrected.