MEXICO CITY (AP) — Mexico's four presidential candidates squared off in their third and final debate Tuesday night before the country's July 1 elections.

The debate in the colonial city of Merida centered on economic growth, poverty, health, education and technology, based on questions culled from social media.

Front-runner Andres Manuel Lopez Obrador holds a commanding lead of as much as 20 percent in some polls over his main rivals, Jose Antonio Meade of the ruling Institutional Revolutionary Party and Ricardo Anaya who represents a left-right coalition.

Lopez Obrador and Meade sparred over the issue of economic policy, with Meade arguing that the policies of the leftist Lopez Obrador would lead to rising poverty and unemployment. "We've seen this movie before," Meade said.

Lopez Obrador said he would try to save the North American Free Trade Agreement, which is threatened by the possibility that President Donald Trump may walk away from negotiations. But he also said he wanted to strengthen Mexico's domestic market and turn away from the export-oriented policies of recent administrations.

"Mexico can produce what it consumes," Lopez Obrador said.

Anaya aimed a salvo at President Enrique Pena Nieto, pledging that "there will be a commission to directly investigate the president" for alleged scandals, including a mansion that first lady Angelica Rivera bought from a government contractor and the unresolved disappearance and assumed slaying of 43 college students in 2014.

Anaya has often tried to play the role of a tech guru in the campaign, and on Tuesday promised that as president he would guarantee every Mexican had a tablet or smartphone.

Independent candidate Jaime Rodriguez rounds out the field, and as usual made the most extreme proposals, such as ending most government hand-out programs.

"We have to make people work," Rodriguez said. "There are a lot of lazy people in this country who are receiving" government aid.

All the candidates accused each other of corruption. Anaya made the most startling claims, accusing Lopez Obrador — known for his personal austerity — of having granted no-bid contracts to a businessman when he was mayor of Mexico City from 200 to 2005.

Anaya accused Meade of having been involved in the contracts-for-bribes scandal involving Brazilian construction company Odebrecht.

Lopez Obrador hit back, saying: "I am not a corrupt person like you," referring to a real-estate scandal that has dogged Anaya.

All but Meade railed against the corruption that Mexicans see as one of their country's main problems. Running third in polls, he has been hobbled by his unwillingness to criticize the highly unpopular Pena Nieto or his Institutional Revolutionary Party, of which Meade is not a member.