MEXICO CITY—Mexico’s former first lady Margarita Zavala secured the needed number of citizens’ signatures to run as an independent candidate in July’s presidential election, a move that analysts say would divide the field of candidates and benefit front-runnerAndrés Manuel López Obrador.

Ms. Zavala, a conservative lawyer married to Felipe Calderón, who was president from 2006 to 2012, got 867,000 valid signatures across 17 states, Mexico’s electoral agency said Friday. She exceeded the required amount by 3,000 signatures.

Two other independent hopefuls, leftist Sen. Armando Ríos Piter and Nuevo León state Gov. Jaime Rodríguez, were disqualified with insufficient valid signatures.

Aides for the two said they may challenge the decision before the electoral court.

Mr. Ríos Piter said in a videotaped messaged posted on Twitter that he would demand a review ”signature-by-signature, because our signatures are of flesh and bone.”