(CNN) President Donald Trump said tariffs on Mexican goods are "indefinitely suspended" after negotiators from the US and Mexico were able to reach a deal on immigration enforcement.

"I am pleased to inform you that The United States of America has reached a signed agreement with Mexico," Trump tweeted Friday. "The Tariffs scheduled to be implemented by the U.S. on Monday, against Mexico, are hereby indefinitely suspended."

The announcement was a dramatic reversal of a sudden tariff threat that Trump himself announced last week in an attempt to put more pressure on the Mexican government to stem the flow of migrants into the US. Trump spent much of the intervening period out of the country, visiting with European leaders and attending a state dinner in the United Kingdom, while US and Mexican negotiators worked feverishly in Washington to avoid another escalation in his foreign trade wars.

Trump has leaned on tariffs as a favorite bargaining mechanism, including in his ongoing dispute with China, with mixed results, and his Mexico threats drew open opposition from top Republican senators as well as blowback from the business community.

His decision to back off three days of intense discussions in Washington between Mexican officials and the Trump administration, with talks between Mexican Foreign Minister Marcelo Ebrard and State Department officials lasting for more than 11 hours Friday.

Trump had threatened to impose tariffs on all Mexican goods entering the US if Mexico did not limit the number of Central American migrants moving through the country to the US. He said late Friday, after he had returned to the White House from his visit to Europe for D-Day commemorations , that the Mexican officials had agreed to his demands.

"Mexico, in turn, has agreed to take strong measures to stem the tide of Migration through Mexico, and to our Southern Border," Trump tweeted. "This is being done to greatly reduce, or eliminate, Illegal Immigration coming from Mexico and into the United States. Details of the agreement will be released shortly by the State Department. Thank you!"

Trump's assertion was met with derision from Senate Minority Leader Chuck Schumer, who has crossed swords with the President repeatedly over immigration -- particularly over Trump's demands for money to build a border wall, which triggered a record-long government shutdown last fall.

Late Friday, the New York Democrat tweeted: "This is an historic night! @realDonaldTrump has announced that he has cut a deal to 'greatly reduce, or eliminate, Illegal Immigration coming from Mexico and into the United States.' Now that that problem is solved, I'm sure we won't be hearing any more about it in the future."

On Saturday, House Speaker Nancy Pelosi responded to the latest development with Mexico, saying in a statement that Trump "undermined America's preeminent leadership role in the world by recklessly threatening to impose tariffs on our close friend and neighbor to the south." Congress, she said, will hold the White House "accountable for its failures to address the humanitarian situation at our southern border."

"We are deeply disappointed by the Administration's expansion of its failed Remain-in-Mexico policy, which violates the rights of asylum seekers under US law and fails to address the root causes of Central American migration," Pelosi said.

But Trump earlier Saturday criticized media coverage and said "the reviews and reporting on our Border Immigration Agreement with Mexico have been very good" in a series of morning tweets.

"Mexico will try very hard, and if they do that, this will be a very successful agreement for both the United States and Mexico!" the President wrote in a tweet . He continued later Saturday: "MEXICO HAS AGREED TO IMMEDIATELY BEGIN BUYING LARGE QUANTITIES OF AGRICULTURAL PRODUCT FROM OUR GREAT PATRIOT FARMERS!"

A declaration amid a crisis

The United States and Mexico signed onto a joint declaration as a result of the negotiations. The State Department said in a statement that as part of the agreement, Mexico will take "unprecedented steps" to increase enforcement to curb irregular migration, including the deployment of its National Guard throughout the country -- giving priority to Mexico's southern border.

The countries also agreed that individuals caught crossing into the US from Mexico seeking asylum will be "rapidly returned" to Mexico where they will await consideration of their asylum claims. Mexico, the declaration says, will authorize the entrance of all of those individuals. Mexico says it will offer jobs, health care and education to those people. In return, the US must expedite the asylum adjudication process.

The declaration also reiterates the countries' commitment from last year, which emphasizes US support for development in Central America and southern Mexico.

However, the agreement does not include requiring asylum seekers to first apply for asylum in the US while in Mexico.

While the US got what it wanted from Mexico in terms of border enforcement and breaking up trafficking networks, the US did not get Mexico to agree to have asylum seekers from Central America face asylum proceedings in Mexico or the first country they cross through, rather than in the US.

Discussions will continue and the two countries may announce further efforts within the next 90 days if necessary, the statement said.

The deal comes amid a surge in migrants crossing into the US, straining the resources of federal immigration and border authorities. More than 144,000 migrants were encountered or arrested at the US-Mexico border in May, US Customs and Border Protection said this week , a roughly 32% increase from the previous month and the highest monthly total in more than a decade.

Of those, nearly 133,000 crossed the US-Mexico border illegally, including more than 11,000 unaccompanied children.

Mexico has already pledged to send about 6,000 National Guard troops to its southern border with Guatemala in a bid to cut off the flow of Central American migrants whose journey to the US's southern border has led to the steep spike in border crossings in recent months.

But US officials demanded more.

US officials pressed Mexico to change its asylum policy by entering into a "safe third country" agreement with the US. Mexico had rejected those offers in the past, but US officials said Mexico was more open to some version of this idea in talks on Thursday. The goal was to require Central American migrants to face asylum proceedings in Mexico or the first country they cross through, rather than in the US.

Mexican officials, meanwhile, urged the US to address the root causes of Central American migration by investing in programs that would reduce poverty and violence in those countries. Trump, though, moved earlier this year to cut US foreign aid to those countries , a move even US officials say is counterproductive.

Diplomats celebrate avoiding tariff confrontation

Secretary of State Mike Pompeo on Friday night praised his counterpart in the Mexican Foreign Ministry, thanking Ebrard and his team for their hard work in negotiating a deal.

"We would like to thank Mexican Foreign Minister Marcelo Ebrard for his hard work to negotiate a set of joint obligations that benefit both the United States and Mexico," Pompeo said in a statement. "The United States looks forward to working alongside Mexico to fulfill these commitments so that we can stem the tide of illegal migration across our southern border and to make our border strong and secure."

Mexican Ambassador to the US Martha Barcena also praised Ebrard, and said the deal would address what she called a humanitarian crisis on the border.

"Mexico will strengthen the measures for the implementation of its immigration law. Provide job, education and health opportunities for people who wait in Mexican territory for the end of their asylum process in the US," Barcena tweeted.

In a news conference following the announcement of the declaration, Ebrard told reporters that it was a fair deal. He said that the Mexican delegation had moderated some of the US' requests, such as a safe third country agreement, which would require asylum seekers traveling through Mexico to make their case for American asylum in Mexico. But Mexico did allow others, such as an expansion to Section 235(b)(2)(C) of the Immigration and Nationality Act that would return asylum seekers to Mexico for the duration of their immigration proceedings.

"I think it is a fair balance because they have more drastic measures and proposals at the start and we reached some middle point," he said. "For instance, they accepted to support the program that Mexico proposed in Central America. They proposed in the first meeting to have (a) third safe state, which is not the case here, which is very important. And on the other hand, we accepted to have a more extended version of 235 and to accelerate the deployment of the national guard. So it's a fair play, I think."

Days of pressured negotiations

Administration officials had said earlier Friday that they were prepared to move forward with the threatened tariffs on Mexico , even as negotiations continued in Washington over addressing the immigration issues at the heart of the standoff.

The Trump administration was expected to submit legal notification on Friday of its intention to implement tariffs Monday on Mexico , Vice President Mike Pence's chief of staff Marc Short said. But Short said Trump could "turn that off" over the weekend if negotiations "continue to go well," which appeared to be the route Trump chose Friday.

"There's a legal notification that goes forward today with a plan to implement tariffs on Monday, but I think there is the ability -- if negotiations continue to go well -- that the President can turn that off at some point over the weekend," Short had told reporters at the White House on Friday morning.

Trump faced a Friday deadline to sign an executive order to ensure the tariffs go into effect by Monday, his deadline for Mexico to meet his immigration demands or face a 5% tariff on all exports to the US.

Trump on Thursday had said "a lot of progress was made" earlier this week in talks with Mexican officials, but repeatedly stood by his vow to impose the tariffs, despite criticism from some Republicans, who have urged him to delay the implementation.

Some Republican lawmakers had expressed concern about the impact of tariffs on all goods that cross into the US from Mexico, a move that could ultimately lead to higher prices for US consumers and hurt US businesses as well as the Mexican economy.

Short hit back at the uneasy Republican lawmakers earlier Friday.

"We wish that members of Congress would spend as much time looking to fix the problem legislatively as they do bellyaching about what the President is doing trying to fix the problem," Short said when asked about Republican opposition to his tariffs.

Short said specifically that the administration wants Congress to change US asylum laws that "allow families to basically come across the border and be protected and let go into our United States until the adjudication process completes."

This story has been updated.