(CNN) Mexico has sharply reduced migration across its territory toward the United States, officials say, and recent polls suggest hardening local attitudes toward migrants who remain in the country.

Foreign Minister Marcelo Ebrard announced Monday that Mexico had reduced northward migration by 36.2%. He credited the National Guard and a tightening of immigration enforcement for the change, all part of a 45-day trial to prove to the United States that measures to stem migration are working.

Ebrard's announcement comes on the heels of a poll released last week that suggests attitudes are changing in a country that welcomed many migrants just a year ago, when ordinary citizens offered food and donations to people making their way from Central and South America to the US-Mexico border.

The poll, conducted by the Washington Post and Mexican newspaper Reforma, showed a sizable majority of Mexicans feel that increased migration through the country from Central America is a burden on their economy and services. Just over half also favor deporting more migrants, according to the poll.

Consistent pressure and threats of tariffs from the Trump administration have spurred the government of Mexican President Andrés Manuel López Obrador, better known as AMLO, to crack down on migration routes. The effect can be felt especially on the Mexican-Guatemalan border, where 6,000 Mexican National Guard troops have been dispatched to curtail illegal immigration.

Read More