Mexico's President Enrique Peña Nieto delivers a message after US Republican candidate Donald Trump won an unexpected victory in the presidential election, Mexico City, Mexico. Thomson Reuters

Mexican President Enrique Peña Nieto's approval rating has slumped to a new low since Donald Trump won the US presidency last week, in part due to his invitation of the real-estate tycoon to Mexico during the campaign, a poll showed on Sunday.

The survey by polling firm Buendia & Laredo for newspaper El Universal said approval of Peña Nieto's performance had fallen to 25% from 29% in July, hurt by discontent about the economy, rising violence, and failure to battle corruption.

Peña Nieto's six-year term concludes at the end of November 2018, and opinion polls show his centrist Institutional Revolutionary Party (PRI) faces an uphill battle to retain power after the next presidential election, scheduled for July 2018.

Mexican law bars the president from seeking reelection.

The government is scrambling to head off the risk of an economic shock from the election of Trump, who has pledged to isolate Mexico behind a border wall, and threatened to impose steep tariffs on Mexican goods and tear up a joint trade deal.

To try and create some leverage, Peña Nieto's government hosted Trump for talks on August 31. However, the hastily arranged visit was staged with scant input from the cabinet and created the impression it was realized on Trump's terms.

Then-Republican presidential nominee Donald Trump and Mexico's President Enrique Peña Nieto shake hands at a press conference at the Los Pinos residence in Mexico City, August 31, 2016. Reuters/Henry Romero

Some 66% of respondents said Peña Nieto had made a mistake in inviting Trump because he had offended Mexicans in the election campaign. Only 30% believed it was a wise move that furthered Mexico's interests, the survey showed.

When asked what was the "worst thing" Peña Nieto had done, 7% of respondents cited the meeting with Trump, the third-most-common answer. Only his reforms (12%), and failing to battle crime (9%) were cited more often.

The November 11-15 survey polled 1,000 permanent residents of Mexico and yielded Peña Nieto's lowest approval rating from Buendia & Laredo since he took office in December 2012.

A Mexican client who lives in the US looks at a piñata depicting US Republican presidential candidate Donald Trump hanging outside a workshop in Reynosa, Mexico, June 23, 2015. REUTERS/Daniel Becerril

Another poll, conducted by Mexican newspaper Reforma in mid-August, prior to Trump's visit, found that Peña Nieto's approval rating had sunk 7 points since April, hitting 23% — the lowest rating for a Mexican president since the latter half of the 1990s.

That Reforma poll found 60% of respondents said security in Mexico had worsened, while about 70% said poverty and violence had gone up over the last year.

Reforma's poll also found that 55% of those surveyed thought corruption in the federal government had gotten worse — up from 40% who said the same in April.

Trump sparked outrage in Mexico when he launched his bid for the presidency last year by accusing the country of sending rapists and drug runners north as illegal immigrants. Trump's presidency may yet confirm the pre-election suspicions of some that the composition of the US government will influence the outcome of Mexico's 2018 presidential election.

Peña Nieto's close aide Luis Videgaray, who government officials said was the architect of the meeting, stood down as finance minister a week after Trump's trip. The president himself later conceded the visit could have been handled better.