(CNN) Mexico had already promised to take many of the actions agreed to in Friday's immigration deal with the US -- months before President Donald Trump's tariff threat, officials from both countries who are familiar with the negotiations told the New York Times in a story published Saturday.

Trump moved to accept the existing agreements in a deal Friday after negotiations prompted by his threat to impose growing tariffs on Mexico in response to the border situation dragged on over several days. Talks between Mexican Foreign Minister Marcelo Ebrard and State Department officials lasted for more than 11 hours Friday.

The Mexican government had pledged to deploy the National Guard nationwide with a focus on its southern border -- a key part of Friday's agreement -- during what the Times described as "secret talks" in March between former Homeland Security Secretary Kirstjen Nielsen and Mexican interior secretary Olga Sanchez in Miami, the officials told the Times. DHS confirmed in a March 26 news release that Nielsen and Sanchez met in Miami and discussed the Migrant Protection Protocols and other security measures.

The deal's key expansion of a program that would keep asylum seekers in Mexico while their claims are processed was established in two heavily brokered two diplomatic notes exchanged between the two countries, the Times reported. Nielsen announced the MPP during a House Judiciary Committee hearing in late December.

One senior government official insisted to the Times that the Mexican government agreed to move to deter migrants faster and more aggressively than they ever had before this week's talks.

Read More