Afghan women attend an campaign event for President Ashraf Ghani in Kabul on Monday. (Rafiq Maqbool/AP)

Taliban militants announced Tuesday that they intend to disrupt Afghanistan’s presidential campaign and Sept. 28 polls. Their statement came just hours after U.S. envoy Zalmay Khalilzad reported “excellent progress” during talks with the insurgents in Qatar.

The Taliban urged voters to stay away from election-related events, saying it did not want to harm them. Amid security fears after a bomb and gun attack July 28 killed 20 people at the Kabul office of one vice presidential candidate, Afghan media reported that another candidate had canceled a rally planned for Monday near the capital. 

In a statement on its website, the Taliban said the elections would have “no legitimacy” because the country is “under occupation.” It called the elections “a ploy to deceive the common people” and said the “ultimate decision-making power” lies with foreigners who it said are running the process.

The Taliban warning seemed likely to further slow the pace of campaigning. The elections have already been delayed twice because of poor management and bickering within President Ashraf Ghani’s government.

Many Afghans think the vote may be postponed again because of the acceleration of talks between the Taliban and U.S. officials, although Ghani, who is seeking reelection, has said he is determined that it be held on schedule. In addition to the presidential vote, delayed parliamentary elections are scheduled to be held in embattled Ghazni province.

In a statement Tuesday, Ghani’s office said that Afghans “will attend the poll centers and cast their vote to directly elect their future leader and to disgrace the enemies of their freedom.” A spokesman for the Interior Ministry said the government will use all of its resources to protect “the candidates and the election process.”

In its statement, the Taliban alluded positively to the peace talks, saying that “negotiations are underway to bring an end to the occupation and arrangements for intra-Afghan understanding are being put into place.” The elections, the group said, are aimed only at “satisfying the ego of a limited number of sham politicians.”

Combining expressions of concern and threats, the Taliban said that to “prevent losses . . . from being incurred by our fellow compatriots, they must stay away from gatherings and rallies that could become potential targets.”

Taliban insurgents have attacked previous elections, causing two provinces to suspend voting in parliamentary polls last year. No group claimed the July 28 attack at the office of Amrullah Saleh, a former intelligence chief who is running on Ghani’s ticket, but he publicly blamed the Taliban.

Amnesty International, the London-based rights group, condemned the Taliban’s threat against election rallies. That “demonstrates a chilling disregard for human life,” Amnesty said in a statement. “Afghans must be allowed to exercise their rights.”

U.S. officials have said they hope to conclude a peace agreement with the Taliban by early September, in part so that elections can take place. But they have also said they place an equally high priority on both processes. 

President Trump said recently that he hoped to see American troops leave Afghanistan before the U.S. presidential election in 2020, but many Afghans have expressed concern that a hasty troop departure would give too much power to the insurgents.

The Taliban has insisted on a U.S. timetable to withdraw all troops before it will meet with Afghan officials. But Khalilzad, who heads the U.S. peace negotiation team, has repeatedly said that the withdrawal will be based on the Taliban meeting conditions.

In a tweet Tuesday, he said he spent the past several days in Qatar “focused on the remaining issues in completing a potential deal with the Taliban that would allow for a conditions-based troop withdrawal” from Afghanistan.

“We have made excellent progress,” Khalilzad said.

Pamela Constable in Islamabad, Pakistan, contributed to this report.