Twice-failed Mexican presidential hopeful Andres Manuel Lopez Obrador looked out at the supporters packed into the main plaza in this northern desert city to hear his vision for what he calls “radical transformation.”

Just a few years ago, when he came to Chihuahua to gin up support for the National Regeneration Movement, the leftist political party he founded, Lopez Obrador was lucky to draw even 50 people to his events. Now he was being treated like a rock star, his speech broadcast on a massive screen and periodically interrupted by bursts of white confetti and thousands of fans chanting his name.

“We are going to change the regime," he told them. “There will be peace and tranquility in the country.”

If the polls are right, Lopez Obrador will be Mexico’s next president. A week before the July 1 vote, the 64-year-old former Mexico City mayor, widely known by his initials, AMLO, is beating his closest rival by as much as 25 percentage points.

He owes his remarkable rise to sheer persistence — he has essentially been running for president continuously since before 2006, when he first appeared on the ballot — and savvy positioning. The anti-establishment rhetoric he’s been fine-tuning for more than a decade is finally in step with a recent global shift toward populism as well as local outrage over rising violence, endemic corruption and, above all, a sense that Mexico’s ruling class cares only about itself.

Nowhere is his ascent more evident than here in the north, a politically and socially conservative region whose sprawling factories that produce goods for the United States have made it one of the wealthiest areas of Mexico.

In past elections, voters here consistently eschewed the hard left in favor of the long-ruling Institutional Revolutionary Party, known as the PRI, and more recently the center-right National Action Party, or PAN, the only two parties to have held the presidency in Mexico’s modern history.

Leaders from both parties have long sought to undercut Lopez Obrador, an advocate for the working class who is skeptical of free-trade deals, by warning that he would turn Mexico into Venezuela, which has been crippled by food shortages, crime and inflation. Although Lopez Obrador’s message resonates deeply in Mexico’s more agricultural and left-leaning south, he lost his first two presidential elections in large part because he didn’t receive enough votes in the industrialized north.

But Mexico’s political landscape is rapidly changing, and analysts say it is because voters across the country are fed up.

“This election is about disillusionment and anger,” said political analyst Alejandro Hope. “People have experienced the PAN and the PRI and they want something else.”

Alberto Camillo, a lanky 65-year-old who wore leather boots and a white cowboy hat to the June 17 rally in Chihuahua, said he feels he has nothing to lose voting for a new political party.

“The PRI and PAN, they were all the same, they were all rats,” he said.

Neither party had eradicated organized crime or violence, which Camillo said has hurt business at the two restaurants he owns. In fact, he was sure some officials were actually working with the criminals.

He braved temperatures in the 90s to see Lopez Obrador because he thinks Mexico needs a different direction.

“He’s the last hope we have,” Camillo said. “If he doesn’t do well, I won’t vote for anybody ever again.”

Armando Aldana, a 38-year-old lawyer at the event, said he was voting for Lopez Obrador for the first time because there wasn’t a better option. “A lot of people joke that we are voting for AMLO out of desperation,” he said. “And I think it’s true.”

Given their position in the polls, Lopez Obrador’s competitors have begun to seem like afterthoughts.

In second place is Ricardo Anaya, an attorney and former leader of the PAN who has struggled to connect with voters, and in third is José Antonio Meade, a first-time politician who served in the current administration. Trailing them all is Jaime Rodriguez, an independent known as “El Bronco” who has proposed cutting off the hands off public servants accused of corruption.

Fueling voter anger has been a series of political and human rights scandals that have resulted in widespread distrust of public officials.

Miguel Gomez Torres, center, and his wife, Emma, listen while Andres Manuel Lopez Obrador, the front-runner in Mexico's presidential race, speaks at a National Regeneration Movement campaign rally. Gary Coronado / Los Angeles Times

Supporters of Andres Manuel Lopez Obrador greet the Mexican presidential candidate at a campaign rally in Ecatepec. Gary Coronado / Los Angeles Times

The unsolved disappearance of 43 students at a rural teachers college in 2014 continues to be a flash point of indignation, as are the dozen current or former governors facing corruption charges. Pet stores have started selling bags for picking up dog excrement emblazoned with the faces of Mexican President Enrique Peña Nieto and former Veracruz Gov. Javier Duarte, who is accused of stealing especially large amounts of public cash. Both are members of the PRI.

The president’s government is also accused of using spyware to illegally track prominent journalists and human rights advocates and has been criticized for not prosecuting a Peña Nieto ally accused of paying millions of dollars in bribes to a Brazilian construction firm.

Meanwhile, the country’s violence is hitting all-time highs, with nearly 30,000 homicides recorded last year. Many voters blame the bloodshed on Peña Nieto’s predecessor, President Felipe Calderon , whose PAN party will be forever associated with his controversial decision to send tens of thousands of soldiers into the streets to confront drug cartels.

Those factors, along with anxieties about Mexico’s increasingly hostile relationship with the United States since President Trump ’s election, have provided a perfect opening for Lopez Obrador, said Miguel Silva Hernandez, a journalist covering the election for the newspaper El Diario de Chihuahua.

Locally, he said, voters are angry about a former PRI governor accused of diverting public funds to help pay for Peña Nieto’s 2012 presidential campaign, and homicide rates that have risen 67% since 2015 under Gov. Javier Corral of the PAN.

“People look at Lopez Obrador as a chance for change,” Silva said.

At the candidate’s campaign rally, held in front of the ornate state capitol, a crowd of about 7,000 danced to a cumbia band and cheered as Lopez Obrador laid out his signature economic plans: Double the minimum wage, reexamine recent free-market energy reforms and make Mexico less reliant on foreign trade.

But Lopez Obrador drew the loudest cheers with his withering critique of Mexico’s political class.

The way he sees it, Mexico is run by a “mafia of power” of business and political elites who have prioritized their own interests at the expense of ordinary Mexicans, about 40% of whom live in poverty. To strip the elite of influence, he has vowed to slash pensions for former presidents and eliminate private insurance for elected officials. He has promised to cut his own salary in half, to sell Peña Nieto’s presidential jet and not live in Mexico’s presidential palace.

“I’m not going to live in any mansion,” he said to roaring applause. Instead, he plans to continue residing in his humble Mexico City townhouse with his wife and 11-year-old son.

Spry and deeply tanned, his silver hair combed back into a boyish mop, Lopez Obrador has long been the most recognizable alternative to Mexico’s two dominant political parties.

During his earlier failed presidential runs as a member of the left-leaning Party of the Democratic Revolution, he was known for his messianic ability to draw supporters into the streets in his base in and around Mexico City — and for clashing with opponents who claimed his radical vision represented a “danger for Mexico.”

After his narrow 2006 loss to Calderon, which he blamed on vote fraud, he mobilized his supporters for a months-long protest that crippled traffic on a main street in the capital. His adversaries today point to that protest as evidence that Lopez Obrador lacks respect for democratic institutions, accusing him of a puritanical zeal that borders on authoritarianism.

In recent months, they have repeatedly warned voters again electing him, with one business leader telling his employees in a letter that doing so would bring about “catastrophic effects.”

Lopez Obrador has said the efforts against him are part of a "dirty war" waged by wealthy tycoons “who don't want to stop stealing.”

Supporters try to get a photo with Andres Manuel Lopez Obrador after he spoke at a National Regeneration Movement campaign rally. Gary Coronado / Los Angeles Times

But he has also softened his rhetoric — particularly on economic issues — to appeal to moderate voters who may have found him too radical in the past.

Breaking from his history of bashing the North American Free Trade Agreement, which he said plunged millions of rural Mexicans into poverty because small farmers and ranchers couldn’t compete with corn, cheese and other U.S.-subsidized imports, he now insists he supports free trade and the renegotiation process triggered last year by Trump.

Speaking in Chihuahua, Lopez Obrador sought to assuage fears that he is the next Hugo Chavez .

“They say this is populism,” he told the crowd. “That is something they use to create fear.”

Real change in Mexico will require a wide coalition, he said, and that means welcoming in members of other parties. “We need to have our doors open,” he said.

To make inroads in the north, he chose as his campaign manager an ex-PAN legislator who lives in the northern state of Nuevo Leon. He has also traveled frequently with Alfonso Romo, a wealthy businessman from the industrial city of Monterrey who Lopez Obrador is expected to name as his chief of staff.

Lopez Obrador has made the north a priority this election, launching his campaign in the violent border city of Juarez and pledging to reduce taxes in border communities and lower the cost of gasoline, which has risen significantly as part of Peña Nieto’s effort to end the state monopoly of the oil industry, and which has been a particularly big issue here.

His critics accuse him of making promises that will be impossible to fulfill. Along with cutting gas prices and raising the minimum wage, he has pledged to create an array of social programs for the elderly, the sick and for students, all without raising taxes. Lopez Obrador insists he will pay for the new program with money saved by stamping out billions of dollars in annual corruption.

Exactly how he plans to eliminate corruption is unclear. Lopez Obrador has said he will lead by example, but critics say that may not be enough in a culture where bribe-paying is regarded as a fact of life.

Even some supporters say they know he may be promising too much.

But what matters most to backers such as Maria Isabel Perez Cervantes — a 57-year-old teacher in Chihuahua who has been voting for him since 2006 — is not whether he achieves every goal, but that he continues to be honest, she said.

Even though his opponents have tried, “they’ve never found any dirt on him,” she said. “As long as he gets the rats out, I’ll be happy.”

Perez said she was heartened to see larger crowds supporting Lopez Obrador, even if it meant that she couldn’t snap a selfie with him, as she had at small events with him in the past. She smiled at the hordes of people surrounding him as he stepped off the stage and tried to walk to his motorcade.

“Back then,” she said. ‘They always said we were crazy.”

kate.linthicum@latimes.com

Twitter: @katelinthicum