The outcome of President Trump’s escalating confrontation with Central American asylum seekers could prove vital in demonstrating whether his hard-line immigration strategy can pay off ahead of a looming fight for border-wall funding.

Trump’s presidency is shaping up as a crucible to test the belief among border hawks that an all-consuming focus on enforcement and deterrence will drive down illegal immigration more effectively than other ideas from moderates and liberals, including additional legal pathways for migrants to remain in the country.

So far, however, Trump has been largely stymied on his top campaign promise to reduce the pressure on the U.S.-Mexico border — even as he is demanding at least $5 billion for the wall. The violent clashes at the border between San Diego and Tijuana over the weekend represent the third major inflection point in the Trump administration’s shock-and-awe enforcement strategy — after the limitations of the travel ban and the failure of a family separation policy.

Like those efforts, Trump’s restrictions on the asylum system have quickly been restrained by federal courts. And video footage on Sunday of migrants throwing rocks and trying to breach a barrier — prompting border agents to fire tear gas at them — has created another potential political quagmire for the White House, similar to the protests at U.S. airports and widespread condemnation of images showing children housed in cage-like detention facilities.

“I think he’s enormously frustrated he hasn’t been able to move the dial on this,” said Doris Meissner, an analyst at the Migration Policy Institute, a nonpartisan think tank, who served as commissioner of the Immigration and Naturalization Service under President Bill Clinton. “He keeps coming back to the issue and can’t show results beyond the rhetoric and raising the [political] temperature.”

In the current standoff near Tijuana, where thousands of migrants have massed amid Trump’s efforts to limit asylum protections and force people to turn around, Meissner added: “You’re seeing here again he wants quick, highly visible, dramatic solutions that are inimical to how immigration works. You have to dig in for the longer term.”

Trump’s allies argued that the political dynamics favor the president this time. The administration’s initial travel ban, implemented without public warning on a Friday night in March 2017, was promptly enjoined by federal judges, forcing the administration to rewrite the order more than once before a stripped-down version was upheld by the Supreme Court this past spring.

In July, in the face of an international outcry, the president reversed his administration’s decision to implement a “zero tolerance” policy to criminally prosecute all adult border-crossers, resulting in more than 2,000 children being separated from their families by the Department of Homeland Security.

But Brandon Judd, president of the National Border Patrol Council, said those policies were rushed and poorly implemented. He said the president’s effort to curtail the asylum system — the number of Central American migrants seeking protections has rapidly risen in recent years — was not and has shifted the onus onto the migrants to follow Trump’s decree that only those who appear at official U.S. ports of entry will have a chance at asylum hearings.

The hundreds of migrants who rushed the border fence near Tijuana “did not want to follow the law,” Judd said. “They tried to violate the laws, tried to rush the border, started throwing rocks and bottles. Several agents were, in fact, struck. The situation was untenable and the use of tear gas was the proper way to deal with it.”

Judd suggested that the American public “will now see images of people who are saying, ‘We don’t care what the laws are; we will force our will upon you.’ . . . Ultimately, the public will look and say [Trump] is doing everything within his power to secure the border right now.”

Critics characterized Trump’s preoccupation with the migrant caravan that traveled north mostly by foot from Central America in the weeks ahead of the midterm elections as a cynical ploy to fan unwarranted public fears — one that he quickly lost interest in after Election Day.

His renewed focus on the issue comes as the White House deliberates over a looming congressional budget fight in which Trump has threatened a partial shutdown of the federal government if he does not win significant funding for his wall proposal.

Democrats said it is unlikely that they would support Trump’s demands for at least $5 billion for the wall after voters overwhelmingly backed the party in its bid to regain control of the House for the first time in eight years.

During the 2016 presidential campaign and in the early days of his presidency, Trump said that Mexico, not U.S. taxpayers, would finance the wall. But he’s dropped that claim and now argues that Congress must provide the funds.

In a tweet on Monday, Trump demanded that Mexico deport the “flag waving Migrants, many of whom are stone cold criminals, back to their countries.” He threatened to permanently close the border — the San Diego border station near Tijuana was temporarily shuttered on Sunday — and called on Congress to “fund the WALL!”

But Trump’s threat was met with criticism from leading Republicans. “Closing the border would be bad for business and certainly hurt the Mexican and border economies, certainly hurt my constituents, and it’s not necessary,” Senate Majority Whip John Cornyn (R-Tex.) said.

Mexico on Monday announced that it had deported 98 Central American migrants involved in Sunday’s border confrontation. And key figures in the incoming administration of Andrés Manuel López Obrador have signaled a potential willingness to work out a short-term solution that would allow migrants to remain in Mexico pending their asylum hearings in the United States.

But such an agreement would probably face new legal challenges and create additional humanitarian problems, experts said.

“It might be a reasonable talking point this week, but in three months, six months, a year — it will not look like a solution to anything,” said Cecilia Muñoz, an analyst at the liberal New America think thank who served as President Barack Obama’s domestic policy adviser. “For all this administration’s efforts, can anyone in America say this situation is better now than it was two years ago? This crisis at the border is entirely of this administration’s making.”

In fiscal 2018, 107,212 Central American family members were arrested at the border, obliterating the previous high of 77,857 set in 2016 — evidence, Trump’s critics said, that his policies have failed.

Mark Krikorian, executive director of the Center for Immigration Studies, which advocates for lower immigration levels, said Trump’s policies have not remained in place long enough to succeed. In Krikorian’s view, “the violence on the border yesterday vindicates Trump’s claims” that the migrants in the caravan can be dangerous and it “strengthens Trump’s hand” entering the wall funding debate.

Krikorian acknowledged that Trump’s crackdown on asylum is unlikely to be a long-term solution, but he called it “a test of the president’s ability to clarify who is responsible for this situation” and pin the blame on congressional Democrats for opposing his approach.

“The question is who has the more persuasive case?” Krikorian said. “That this violence at the border was initiated by people asking for us to take them in makes the Democratic case less plausible and the president’s case more plausible.”

Seung-Min Kim contributed to this report.