KABUL, Afghanistan — Protesters demanding anti-fraud measures shut down the offices of Afghanistan’s election commission in three of the country’s major provinces on Saturday, just weeks before a vote for Parliament, the latest symptom of a political logjam that could turn violent amid a raging war with the Taliban.

The last-minute jockeying over an election already delayed by three years has again exposed a depressing reality: that after five elections over 17 years, costing about $1 billion, Afghanistan still lacks the most basic consensus on how an election should be held and a credible body to oversee it.

The offices were shut in Balkh Province in the north, Kandahar in the south, and Herat in the west, according to Abdul Aziz Ibrahimi, a spokesman for the election commission. The protesters, largely supporters of powerful regional figures who have intensely feuded with President Ashraf Ghani, locked the gates of the commission’s offices in all three provinces and pitched tents outside to hold sit-ins.

Gen. Akhtar Ibrahimi, the deputy minister of interior, said the government had instructed security forces to protect the election offices and “to use force if necessary.”