US President Donald Trump accidentally revealed Tuesday that Mexico agreed to take stronger legal action to halt Central American migrants if its initial efforts to stem the flow don't show results in 45 days.

In bright sunshine outside the White House, Trump waved what he said was the text of an agreement Mexican and US officials signed Friday to avert the application of tariffs on their exports to the United States.

Photographs of the document revealed that Mexico appeared to pledge to enact or enforce certain domestic laws if Washington is not satisfied with the results of its first promised efforts -- deploying 6,000 National Guardsmen to reinforce its southern border and expanding its policy of taking back asylum-seekers as the United States processes their claims.

If, after 45 days, the US government ‘determines at its discretion’ that the results aren't enough, the document says, ‘the Government of Mexico will take all necessary steps under domestic law to bring the agreement into force.’

The document gives the Mexican government another 45 days to achieve that.

It was not clear what specific measures the Mexican government would have to take.

Washington said last week it wanted Mexico to agree to a ‘safe third country’ policy, in which migrants entering Mexican territory must apply for asylum there rather than in the US.

Trump waved the ostensible agreement in front of reporters amid questions about whether his administration really did reach a substantial agreement last week to stem the flow of hundreds of thousands of migrants who pass through Mexico to enter the United States.

The initial deal appeared to repeat previous undertakings the Mexicans have made.

But Trump has repeatedly suggested there is another secret part of the deal that would require more of Mexico.

‘Mexico is doing a great job at the border, really helping us,’ he said Tuesday.

‘They have been working very hard. We're doing very well together. Good relationship.’

- 'Everything is right here' -

Foreign Minister Marcelo Ebrard, who led Mexico's negotiating team in Washington, repeated his denial that there is a secret annex to the deal.

‘You're not going to see it anywhere. Absolutely everything is right here. Everything. There's nothing that's not in this report,’ he told a news conference in Mexico City, holding up the nine-page briefing he plans to deliver to the Mexican Senate.

That document says the countries discussed a ‘possible deal’ to process asylum-seekers in whichever country they arrive in first.

If Washington deems the results of the initial measures insufficient after 45 days, Mexico City has another 45 days to implement the agreement.

Ebrard evaded reporters' questions on what exactly that additional deal would look like.

‘Mexico is not going to fail. Mexico is open to negotiations if we fail, but we're not going to fail,’ he said.

Pressed on what Mexico will do if Trump deems otherwise, he said, ‘I'm not going to reveal Mexico's strategy... That wouldn't be prudent.’

Mexico's leftist government has insisted tighter borders cannot be the only solution, insisting on the need to protect migrants' rights and fund major infrastructure and development projects in Central America.

But Mexico faces huge pressure to deliver immediate results at the US-Mexican border, where American officials detained 144,000 migrants in May, up 32 percent from April -- including a record 89,000 in families.

Ebrard said Mexico would begin deploying its National Guard to the southern border on Wednesday.