Foreign Minister Marcelo Ebrard said if troop reinforcements on its southern borders did not work, “additional measures” would need to be discussed.
He said this might mean a “regional solution” involving other nations.
But the US is also likely to require Mexico to process the asylum claims of migrants on its own soil.
- Is there a crisis on the US-Mexico border?
- Trump’s border wall – in seven charts
What has Mr Ebrard said about the deal?
He held a press conference which seemed to suggest a difference of opinion about what was actually in the deal announced between the US and Mexico last Friday.
In a tweet, US President Donald Trump said there was a “very important part” of the deal that had been “fully signed and documented” but not yet announced that would give the US what it had been asking for “for many years”.
“It will be revealed in the not too distant future and will need a vote by Mexico’s legislative body”, the president tweeted, adding that if the vote failed “tariffs will be reinstated”.
Commentators suggest this is the “safe third country” arrangement, under which migrants would have to apply first for asylum in Mexico, rather than the US, and be turned away if they do not.
Mr Ebrard said the US had been insistent on this measure.
But he said: “We told them – I think it was the most important achievement of the negotiations – ‘let’s set a time period to see if what Mexico is proposing will work, and if not, we’ll sit down and see what additional measures'” are needed.
“They wanted something else totally different to be signed. But that is what there is here. There is no other thing,” he said.
Mr Ebrard also said US negotiators had wanted Mexico to commit to “zero migrants” crossing its territory, but that was “mission impossible”.
President Trump has also said Mexico will soon make “large” agricultural purchases from the US.
Read More: Deadly storms push through the US East Coast
But Mr Ebrard said there had been no additional agreement with the US and that the American president was probably referring to expected growth in trade following the migration deal.
So what will Mexico be doing?
It is deploying 6,000 National Guard personnel to the southern border with Guatemala to try to stem the flow.
It has also agreed to support the expansion of the scheme that returns asylum seekers already in the US to Mexico to wait out the processing of their claims.
Mr Ebrard said the efforts to stem the flow on the southern border would be re-evaluated in mid-July.
If it failed, he said, other countries would need to be drawn in to the matter. Discussions would begin with Brazil, Panama and Guatemala – the countries currently used by migrants as transit points.
A “safe third country” arrangement would create huge problems for Mexico, which says it does not have the resources to integrate thousands of additional migrants.
How did we get here?
Illegal border crossings on Mexico’s northern border with the US have been on the rise again after reaching a low in Mr Trump’s first year in office.
In February, he declared an emergency on the US-Mexico border, saying it was necessary in order to tackle what he described as a crisis.
In May, Mr Trump threatened that 5% tariffs on Mexican goods would be imposed on 10 June and rise by 5% every month until reaching 25% in October if Mexico did not take substantial action to curb migration.
Mexico is currently one of the largest trading partners for the US, just behind China and Canada.