KABUL, Afghanistan — An election complaints agency on Thursday invalidated all of the votes cast in Kabul Province in October’s parliamentary election, more than a million in all, over fraud allegations, pushing the country toward another political crisis just as a top American diplomat arrived to build momentum for peace talks with the Taliban.

The ruling set up a stalemate with the agency administering the vote, the Independent Election Commission. The commission said it would ignore the decision invalidating the votes — which would ordinarily require a new election within seven days — and would certify the results of Kabul’s vote in the coming days.

It was unclear how the dispute would be resolved. The complaints agency did not describe the fraud accusations in detail, but it called for the firing of several Independent Election Commission staff members.

The chairman of the Independent Election Commission, Gulajan Abdul Bade Sayyad, denounced the ruling, saying that it would mean disregarding the wishes of people who overcame great risk to cast their votes.