President Donald Trump backed down from his threat on Thursday to shut down the southern border immediately, marking the second such reversal this week.

Talking to reporters at the White House, Trump said he would instead give Mexico a “one-year warning” to halt the flow of drugs and migrants into the United States before taking action. He also said that he would first impose auto tariffs before closing the border.

“The only thing frankly better, but less drastic than closing the border, is to tariff the cars coming in,” Trump said. “We’re going to give them a one-year warning, and if the drugs don’t stop or largely stop, we’ll put tariffs on Mexico and products, in particular cars.”

The reversal comes amid mounting warnings from fellow Republicans, business leaders and even some of his own aides that closing the border with Mexico could be economically devastating.

The U.S. Chamber of Commerce tweeted Wednesday that closing the border would put “many of the five million American jobs that depend on trade with Mexico…in immediate jeopardy.”

Senate Majority Leader Mitch McConnell also discouraged Trump from taking such drastic measures. “Closing down the border would have a potentially catastrophic economic impact on our country, and I would hope we would not be doing that,” he said Tuesday.

But Trump said later that day he was willing to take the risk of closing the border, effectively cutting off trade with the United States’s third-largest trading partner and shutting down an important international commerce hub.

“Sure, it will have a negative effect on the economy,” he told reporters at the time. “It’s a very big trading partner. But to me, trading is very important, the borders are very important, but security is what is most important. I mean we have to have security.”

Ultimately, the president appeared to have heeded those warnings, though he also claimed that his threats had paid off.

“So for the last four days, and you actually have covered it to a minor extent, Mexico has been capturing people and bringing them back to their countries at their southern border,” he said. “They’ve been taking people under their very powerful laws — they have the right to do it — and bringing them back to where they came from. That is about three days now I guess, frankly since they heard I was going to close the border.”

Trump is scheduled to visit the U.S.-Mexico border on Friday. In an interview on Fox & Friends Thursday morning, White House press secretary Sarah Sanders said Trump was making the trip so that Americans will “get a chance to see some of the things that are going on, on the ground and hear from the people dealing with this crisis day in and day out.”

“The president wants to show the progress that we’ve made on the border wall. There’s a section there that has been finished, and he wants to be able to see that,” Sanders said. “But also, he wants to show a lot of people first hand exactly what is taking place at the border.”

The about-face is the second major one for Trump this week. The president appeared to bow from public pressure earlier in the week when he said he had decided to push off any major health care legislation until after the 2020 election.