MEXICO CITY — On paper, Margarita Zavala appeared to have all the connections one might need to wage a successful presidential campaign — she was a former first lady and a former senator, with deep connections across Mexico’s political establishment.

That wasn’t enough. On Wednesday, less than two months before the election, Zavala dropped out of the race, declaring in a short video clip that she was withdrawing “on the principle of political honesty and a sense of congruency.”

Her failure to secure support from more than 10 percent of likely voters, according to polling groups, reflects the enormous challenges facing independent candidates in Mexico, who lack the funding of their party-backed competitors.

This was the first year that independent candidates were allowed to join the race for president here — a change celebrated by many in Mexico, which was a one-party state through much of the 20th century and then was dominated by a few large parties. Ultimately, though, the reform didn't have much impact in the current campaign, leading up to the July 1 election.

“Margarita Zavala’s candidacy was doomed from the start,” said Esteban Illades, editor of Mexico’s Nexos magazine. “The electoral system in Mexico made it impossible for independent candidates to mount a serious challenge to traditional political parties.”

The only other remaining independent candidate, Jaime Heliodoro Rodríguez Calderón sometimes referred to by his nickname “Bronco,” has been lambasted for his extreme policy proposals, like cutting off the hands of thieves. He is polling in the single digits.

Meanwhile, Andrés Manuel López Obrador, the former mayor of Mexico City and a longtime renegade opposition candidate, is leading the race by roughly 20 percentage points, according to polls. Those polls are often incomplete and imprecise, experts say, but they suggest a lead that increasingly looks insurmountable.

Zavala’s husband, Felipe Calderón, of the National Action Party (PAN), was president from 2006 to 2012. His administration was heavily criticized for launching a war against Mexico’s drug cartels that led to a surge in violence across much of the country.

Zavala once hoped to run as the PAN’s candidate, but she lost an internal power struggle, and instead announced she would run outside the party. It was only a few years ago that lawmakers even passed a reform allowing independent presidential candidates.

That change seemed like it might provide an outlet for the enormous frustration Mexican voters felt toward the country’s traditional parties and politicians. Last year, a Pew study found only 6 percent of Mexicans were satisfied with the way their democracy was working.

“The rise of independent candidates has not only provided new incentives for political parties in Mexico to clean up their act and become more accountable to voters, but has also put into question long-held assumptions about electoral tactics in the country,” according to a report from Canning House, a British think tank, ahead of this year’s election.

But most of the would-be independent presidential candidates did not manage to collect enough signatures to appear on the ballot. Zavala’s failure to gain traction has shown how difficult it is for independent candidates, even with her political connections.

“That wasn’t enough, because in the end, money ran out,” Illades said.