KABUL — After weeks of disarray and mixed signals, Afghan officials announced Sunday that the country’s presidential election, scheduled for April 20, will be delayed by three months to ensure the polls are better organized than the chaotic parliamentary elections held in October.

“April will be very difficult because of the harsh winter, transporting election materials, security, and budget issues,” the chairman of the Independent Election Commission, Jan Abdul Bade Sayad, said during a news conference. “To better prepare for the vote, we have decided to hold the election in July.”

But the reasons for the postponement went far beyond the technical glitches and insurgent attacks that marred the parliamentary poll, forcing a one-week voting delay in Kandahar province and an indefinite postponement in Ghazni province after violent attacks in both areas.

For the past several months, the government of President Ashraf Ghani has been caught between competing domestic and international pressures in deciding when to hold the presidential poll, in which Ghani is expected to seek reelection for another five-year term. 

The main source of contention has been the recent efforts to hold peace talks with the Taliban, efforts that have accelerated rapidly through discussions between insurgent representatives and U.S. officials, as well as through meetings that included Russia, Pakistan, Saudi Arabia and other governments. 

The first real progress in moving toward a settlement after 17 years of war has raised hopes among Afghans and the international community. But Ghani, who proposed several truces and meetings with the insurgents, has been largely left out of the process because the Taliban has refused to negotiate with Afghan officials.

Ghani has been hoping to improve his chances of reelection in April by being a champion of peace, but many of his domestic opponents and foreign backers have urged that the polls be delayed to protect the peace talks from political interference. Zalmay Khalilzad, the Trump administration’s special envoy for peace, has said often that he hopes a settlement can be reached before the elections.

Other government opponents had proposed that an interim caretaker government be installed to oversee the peace talks and that the Ghani administration step down in April as required by the constitution. It is not clear what will happen between April and July, but the government seems likely to extend its tenure.

Until this week, Ghani has insisted the polls be held on time, but on Sunday a spokesman for his office said he welcomed the announcement by the election commission. The panel had been widely expected to announce a delay for the past several days. 

“The delay has no technical reason. It was the wish of America to delay the polls because of the peace process,” said Abdul Shokoor Dadras, an analyst in Kabul. If the election were to be held without waiting for the results of negotiation efforts, he said, “then that may have meant the end of the peace process.”

Sayed Salahuddin contributed to this report.