MEXICO CITY — The first presidential election to allow independents on the ballot was supposed to be a step forward for Mexico’s costly, unwieldy electoral system, which has long been dominated by widely resented political parties.

But independent candidates are being forced to use a smartphone app to collect the 866,000 signatures they need to get on the ballot in a country where coverage is spotty and only a minority can afford smartphones

Independents from all ends of the political spectrum are calling the app faulty at best, and downright racist at worst.

Mexico’s registered political parties get on the ballot automatically and are supposed to be almost completely funded by taxpayer money. The National Electoral Institute, or INE — which designed the app — will spend $1.3 billion for the July 1 presidential elections and other races next year. Critics say the institute is bloated, out-of-touch and in thrall to the political fat cats.

The app is designed to take a photo of a person’s voter ID card and upload it, along with other data, to the National Electoral Institute’s databases. But it’s so buggy that independent candidate Margarita Zavala, the wife of former President Felipe Calderon, issued a mocking video pretending to demonstrate how to use it.

“I’m going to show you in two easy steps how to collect a signature,” she says on the video as upbeat music plays.

But the app bogs down with error messages, and the video shows her — supposedly a half-hour later — still trying to make it work as the background music slows down to a dirge and she finally gives up.

And that recorded on a terrace in Mexico City. Imagine trying to do the same in the mountains of rural Chiapas state, where homes are still lit with candles and heated with fires.

That is what bothers Maria de Jesus Patricio, known by her nickname, MariChuy. Support for the Nahua woman, the first independent indigenous candidate, runs deepest among the Zapatista rebels who staged a brief armed uprising for indigenous rights in Chiapas in 1994. Many of their communities lack even phone lines, much less good cell coverage.

“Maybe they designed the process with another country in mind that isn’t Mexico,” a group of her supporters said in a statement on Tuesday. They suggested the app “might work in countries like Switzerland or Sweden.”

The electoral institute says the app is meant to avoid situations like those in past elections where candidates signed up dead people, or registered the same person multiple times. But it requires a speedy data connection and will work only on more expensive models of smartphones.

The institute says that it has approved allowing campaigns to gather signatures on paper — the way it was previously done in local races — in about 5 percent of Mexican townships that comprise the country’s poorest areas.

But campaigns have had to file for individual exemptions to use paper, and everyone in Mexico knows that cellphone coverage is faulty in far more than 5 percent of the country. Even the most extensive cellphone data network doesn’t claim to cover a majority of Mexico. Patricio’s campaign noted that the average cost of smartphones that will work with app is about three times the minimum monthly wage.

“Are there problems with the app? Yes,” acknowledged electoral chief Lorenzo Cordova in an interview with the Televisa network. He promised an update or patch for the software.

That promise — and the pledge of a one-week extension to the Feb. 12 deadline for gathering signatures — rang hollow among the indigenous candidate’s supporters.

“Our campaign is being run primarily in the ‘deep Mexico,’ where no other candidate goes, where there is no cell coverage, where there are no copy machines, where there often isn’t even electrical power,” the campaign supporters wrote. “We are not complaining about their rules. We knew them and decided to compete under them, even though they are racist, classist and discriminatory.”

Zavala on Wednesday suggested the electoral institute should make its 300 district offices nationwide available as signature-gathering centers for independent candidates.

So far there has been no official response.

It’s not the first time that Mexico’s political elites, often educated abroad, have erred by behaving as if they were still in the First World.

In 2003, the administration of then-president Vicente Fox drew a storm of criticism when it opened consultations with farmers and farmworkers on agricultural policy — but said proposals had to be submitted in the PowerPoint presentation program, even though few farmworkers — who often struggled to earn enough to eat — had computers.