MEXICO CITY (AP) — Mexico’s highest electoral court ruled Tuesday that President Andrés Manuel López Obrador’s Morena party has to remove two state governorship candidates from ballots and choose replacements to run in the June 6 elections.

One of the candidates, Félix Salgado, was accused of rape, but has not been charged. Despite the accusations, López Obrador has supported Salgado's right to run in the Guerrero state governor's race, angering women's groups.

However, that was not why the court ruled the candidacies invalid. Instead, the Federal Electoral Tribunal ruled that both candidates violated electoral rules because they did not report how much they spent in primary races.

Mexico largely finances campaigns with government money to encourage equity, and strictly limits private donations or out-of-pocket spending by candidates. But the Morena party has argued that because it nominates candidates based on polls rather than votes, it does not hold primaries.

Morena's candidate for the governorship of the western state of Michoacan, Raúl Morón Orozco, was also told he could not run.

Earlier this month, Salgado had vowed not to allow elections in his home state unless he is allowed to run. That was hardly an idle threat since elections have been partially blocked in some parts of Guerrero in the past and much of the state's territory is dominated by drug cartels or shadowy vigilante groups.

Salgado won Morena's nomination despite protests by women’s rights activists. He has not personally addressed the accusations by two women, though his lawyer has denied them.

Salgado, who goes by the nickname Toro, or “Bull,” is a former federal legislator and mayor of Acapulco who has been known for questionable behavior in the past. He was filmed scuffling with police in Mexico City in 2000.

On Monday, Salgado wrote on social media that he would hold a rally Wednesday in the main square of Guerrero's state capital, Chipancingo, and said: “The people have the final say. With the people, anything, without the people, nothing."

At the same he stressed “our movement is peaceful.”

Morena may well hold on to control of congress in the mid-term elections on June 6, but it has been struggling to gain traction in a number of statehouse races. The party is largely built around López Obrador's personality, and while he remains popular the relatively new party has struggled to build momentum in many states long dominated by other parties.