MEXICO CITY (Reuters) - The second-placed contender in Mexico’s presidential race won the opening televised debate of the campaign on Sunday night, a telephone survey found, after the front-runner came under relentless attack from competitors.

Leftist front-runner Andres Manuel Lopez Obrador of the National Regeneration Movement (MORENA) gestures while leaving the Palacio de Mineria after the first presidential debate in Mexico City, Mexico April 22, 2018. REUTERS/Henry Romero

Tapping into discontent with the ruling Institutional Revolutionary Party (PRI) over corruption and violence, leftist Andres Manuel Lopez Obrador has led polls for months, and all four rivals trained their fire on him during the debate.

Second-placed Ricardo Anaya led the charge, accusing Lopez Obrador of endangering Mexico with a vague proposal to explore an amnesty for criminals to curb the violence, and of hypocrisy for making common cause with people he had once called corrupt.

Running as the candidate of a right-left coalition, the 39-year-old Anaya was deemed the winner of the debate by 36 percent of 245 respondents in the telephone poll by newspaper Reforma. Lopez Obrador came second with 34 percent, it showed.

Pollsters say ad hoc telephone surveys should be treated with caution, but as an initial indication of the ebb and flow of the contest, the positive reception of Anaya was in line with how many Mexican political analysts called the debate.

Lopez Obrador, 64, ignored many attacks and sought to avoid getting into scraps with his adversaries. But he showed signs of irritation as the evening wore on, at one point pulling out a board with his polling numbers to answer critics.

A separate poll of financial market analysts by Reuters on Monday found that 11 out of 13 saw Anaya as the winner. The other two analysts identified no victor.

Anaya’s co-campaign manager, Jorge Castaneda, said the two-hour debate had shown his candidate was the only real alternative to a Lopez Obrador victory on July 1.

“The contrast was very clear between the tired change of Andres Manuel and the radical, fresh, youthful, new change of Ricardo Anaya,” he told Mexican television. “And I think it became clear that this is an election between two (choices).”

Only last week, a Reforma voter survey showed Lopez Obrador extending his poll lead to 22 percentage points over Anaya.

A separate Reforma consultation of “903 leading citizens” from academia, civil society, business, and politics in Mexico City, Guadalajara and Monterrey showed that 68 percent felt Anaya had won the debate, with 16 percent for Lopez Obrador.

That second survey showed that, apart from Anaya, the candidate who most improved his standing in the eyes of respondents was independent contender Jaime Rodriguez.

Rodriguez, a state governor from northern Mexico, put on a confident display, and created a stir by saying politicians who steal money should have their hands cut off.

Polls suggest that Rodriguez has no chance of winning the presidency himself, but his maverick candidacy could plunder votes from the anti-establishment campaign of Lopez Obrador, said Jorge Buendia of polling firm Buendia & Laredo.

Both of Reforma’s ad hoc surveys also found many respondents thought Lopez Obrador was the main loser in the debate.

Afterwards, Lopez Obrador posted a video online saying he believed he had won the debate, but added: “I would like to have responded to other lies, especially from (Anaya).”