(Bloomberg) -- Mexico will require Brazilian tourists to obtain visas to enter the country as it tries to stem a surge of U.S.-bound migrants from across Latin America.

Mexico’s Foreign Ministry announced in a statement Friday that due to “increased flows of irregular” migration, the government would suspend a no-visa pact it’s held with Brazil since 2004. The accord between the two largest Latin American economies will be “temporarily” halted as of Dec. 11, it said.

“Sadly, criminal groups profit, through deception, from the interest of Brazilian nationals to migrate irregularly to the U.S.,” the ministry said.

The Biden administration is grappling with an unprecedented wave of migration on the U.S. southern border, with some 1.7 million people encountered trying to cross this year, according to U.S Customs and Border Protection.

Read More: Record U.S. Border Crossings Kindle GOP Rebuke of Biden Policies

The majority of migrants apprehended, almost 1.4 million, hailed from Mexico and the Northern Triangle in Central America. But the coronavirus and ensuing economic crash spurred hundreds of thousands of people, primarily from other nations in Latin America and the Caribbean, to leave their homes.

Unlike many Haitians and Cubans, who often start their journeys deep within South America and travel by land, migrants from Brazil typically fly to Mexico City before heading north.

In the year through September, nearly 57,000 migrants from Brazil were caught into trying to enter the U.S. from Mexico. That compares to about 7,000 in same period last year, and almost 18,000 in 2019.

The restrictions follow a similar decision by the Mexican government earlier this year to suspend visa exemptions for Ecuadorans. In October, U.S. Secretary of State Antony Blinken spoke with his Brazilian counterpart Carlos Franca to discuss ways the two nations could slow irregular regional migration heading north.

©2021 Bloomberg L.P.