MEXICO CITY (Reuters) - The collapse of the North American Free Trade Agreement would not be fatal for Mexico, the leftist presidential favorite said on Tuesday, while keeping his cool under attack from rivals in the last televised debate before the July 1 election.

Leftist front-runner Andres Manuel Lopez Obrador of the National Regeneration Movement (MORENA) delivers a message after arriving at the third and final debate in Merida, Mexico June 12, 2018. REUTERS/Lorenzo Hernandez

Asked what he would do if talks fail to renegotiate the deal that underpins the vast majority of Mexico’s trade, frontrunner Andres Manuel Lopez Obrador said he would redirect the economy towards the internal market and revive the rural economy.

“I am going to suggest that the treaty remains, but (the end of NAFTA) cannot be fatal for Mexicans, our country has a lot of natural resources, a lot of wealth,” he said in the round table discussion between the four candidates in the city of Merida.

Drawn out negotiations called by Donald Trump with Canada and the United States to modernize NAFTA have reached a deadlock since the U.S. president imposed steel and aluminum tariffs on the trade partners.

With just over two weeks before voters head to the polls, the debate was one of the last chances for the pack of trailing candidates to whittle down leftist Lopez Obrador’s lead.

The four contenders tussled over their visions for changes to Mexico’s healthcare and educations systems, but no one landed any game-changing, knockout punches.

The former Mexico City mayor, in his third bid to reach the presidency, came out unscathed from two prior debates and has since widened his double-digit lead in most polls.

He has double the support of Ricardo Anaya, who heads a right-left coalition, according to a nationwide survey published earlier on Tuesday.

Lopez Obrador again pledged to fund big spending projects by ending corruption but was accused by Anaya of handing out contracts without public tenders when he was mayor of Mexico City.

Lopez Obrador denied the accusation and Anaya held up a placard directing viewers to a website for evidence of his assertions.

But that website was down and a spokeswoman for Anaya said in an emailed statement that the site had likely suffered a Distributed Denial of Service (DDoS) cyber attack.

In DDoS, attackers use computer networks they control to send such a large number of requests for information from websites that servers that host them can no longer handle the traffic and the sites become unreachable.

“On this website, 185,000 visits were registered within 15 minutes, with the attacks coming mainly from Russia and China,” the statement said. “It can take hours to prospect the configurations needed for attacking a website, which indicates the attack was planned and coordinated with national and international agents.”

Reuters could not independently verify the statement.

Lopez Obrador, 64, has benefited from widespread disenchantment with the ruling Institutional Revolutionary Party (PRI) over political corruption, record levels of violence and sluggish economic growth.

PRI candidate Jose Antonio Meade, who is running third in most polls, and independent hopeful Jaime Rodriguez, also baited Lopez Obrador.

But the gray-haired politician did not bite. In the debate, Lopez Obrador showcased the more relaxed, jovial figure he has cut on the campaign trail, mostly avoiding the kind of outbursts that in the past helped adversaries depict him as a radical menace to stability in Latin America’s No. 2 economy.

Lopez Obrador has painted himself as more of a pragmatist and now says he wants to broker a deal with Trump to stem illegal immigration through jobs and development rather than a border wall.