Updated at 10:25 p.m. ET
The U.S. and Mexico have "reached a signed agreement" that would avert the tariffs that were scheduled to begin on Monday, President Trump said on Friday evening.
As part of the deal, Mexican officials "agreed to take strong measures to stem the tide of Migration," Trump tweeted.
Mexican President Andres Manuel Lopez Obrador also praised the deal, thanking "all Mexicans who made it possible to avoid the imposition of tariffs on Mexico products exported to the United States." He called for celebrations in Mexico on Saturday.
Under a joint agreement released by State Department officials, Mexico will assist the United States in curbing migration across the border by deploying its national guard troops through the country, especially its southern border. The agreement also says Mexican authorities will work to dismantle human smuggling operations.
Mexico agrees to accept more migrants seeking asylum in the United States, according to the deal.
For its part, the U.S. promises that those asylum applicants will be "rapidly returned" to Mexico as they await the result of their claims. Mexico agrees to accept them and offer jobs, health care and education.
"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," said Secretary of State Mike Pompeo.
Mexico's ambassador to the U.S., Martha Bárcena, tweeted, "Cooperation for the development and prosperity of southern Mexico and Central America will be strengthened." The joint statement said the countries recognize the importance of economic development in southern Mexico and Central America.
Mexican Foreign Minister Marcelo Ebrard said the National Guard deployment would start on Monday. "I think it's a fair balance," Ebrard said.
The agreement did not include a demand from the U.S. that Mexico agree to a "safe third country" designation, requiring the country to permanently accept most asylum seekers from Central America.
Trump announced on May 30 that he would impose a 5% tariff on all goods imported from Mexico beginning June 10, if Mexico did not take action to stop the flow of migrants from Central America into the U.S. After that, he said the tariffs would go up an additional 5% each month until reaching 25% in October, unless the administration were satisfied with the Mexican government's efforts on immigration.
"If the illegal migration crisis is alleviated through effective actions taken by Mexico, to be determined in our sole discretion and judgment, the Tariffs will be removed," the president's statement said.
U.S. and Mexican officials continued the talks, as Mexico tried to reach an agreement to stop the tariffs from going into effect.
Officials meeting at the State Department focused on possible changes to asylum rules and whether Mexico could keep asylum seekers in their country while their cases in the U.S. were adjudicated.
Mexico's foreign minister announced on Thursday that 6,000 national guard troops would be sent to the country's southern border with Guatemala. Though, that force was recently established and has not gotten up and running, with estimates of full operations to be underway by 2021.
Earlier Friday, the president said "there is a good chance" the U.S. and Mexico could make a deal.
Border crossings have surged in recent months as Central American families have traveled to the U.S. seeking asylum.
More than 144,000 migrants were taken into custody after crossing the Southern border in May, according to data released by U.S. Customs and Border Protection on Wednesday.
Trump is facing rare pressure from congressional Republicans over his decision to link immigration policy to trade.
"There is not much support in my conference for tariffs," Senate Majority Leader Mitch McConnell, R-Ky., told reporters after White House lawyers met with GOP senators at their weekly luncheon on Tuesday.
Lawmakers have warned the tariffs could hurt U.S. businesses and force U.S. consumers to pay more for products imported from Mexico.