Mexico on Friday released a copy of a supplementary agreement to stop migrant flows into the U.S. -- days after Trump inadvertently flashed parts of the deal to cameras.

The June 7 deal will require migrants moving to the border via Mexico to seek asylum there, and for Mexico to identify changes in domestic law to implement the agreement, The Wall Street Journal reported.

The agreement also calls for discussions to establish “definitive terms for a binding bilateral agreement to further address burden-sharing and the assignment of responsibility for processing refugee status claims of migrants.”

TRUMP DEFENDS DEAL WITH MEXICO TO STEM MIGRANT FLOWS, PREVENT TARIFFS

The language is close to that of a “safe third country” agreement that the U.S. has been seeking that means migrants entering Mexico apply for asylum there rather than the U.S. Mexico has resisted such a designation.

The agreement includes a clause by which, if the U.S. determines that the measures adopted by Mexico have not achieved sufficient results in preventing migrant flows after 45 days, then “Mexico will take all necessary steps under domestic law to bring the agreement into force.”

Trump had flashed a folded copy of the deal to reporters this week, and said it’s “the agreement that everybody says I don’t have.” Photojournalists, however, were able to see through the paper and glimpse part of the agreement.

TRUMP RAISES SPECTER OF IMPOSING 'VERY PROFITABLE' NEW TARIFFS ON MEXICO DESPITE DEAL BREAKTHROUGH

The supplementary deal’s release comes a week after Trump announced that the two countries had reached an agreement to prevent U.S. tariffs on Mexican imports in exchange for Mexico taking tougher measures on migrant flows -- that have increased significantly in recent months to well over 100,000 a month.

According to a joint declaration issued by the State Department and Mexico last week, Mexico will take “unprecedented steps to increase enforcement to curb irregular migration, to include the deployment of its National Guard throughout Mexico, giving priority to its southern border.”

The U.S. will also expand its “Remain-in Mexico” policy of returning asylum applicants to Mexico while their claims are processed. The U.S. committed to accelerate asylum claims while Mexico said it will “offer jobs, healthcare and education according to its principles.”

“Mexico will try very hard, and if they do that, this will be a very successful agreement for both the United States and Mexico!” Trump said last Saturday.

CLICK HERE TO GET THE FOX NEWS APP

According to the Journal, Mexican Foreign Minister Marcelo Ebrard said this week that it is seeking a multilateral solution to the crisis, and will begin working with several U.N. agencies beginning next week.

“This isn’t just a Mexican issue, not just an issue for El Salvador, Guatemala, Honduras, it’s one of the biggest migration flows in the world,” he said.