Many analysts fear that the crisis over the vote could stretch for weeks, because the audit will be carried out by the same election commission that opposition candidates had accused of mismanagement and of favoring Mr. Ghani.

Mr. Ghani’s supporters, in return, accuse the opposition of playing an obstruction game, challenging his victory so they can get a share in the government.

The political crisis continues amid sensitive peace negotiations to end the long war in Afghanistan. Taliban officials and American negotiators have been meeting for weeks trying to finalize a peace deal that was torpedoed by President Trump last September just as the two sides were ready to sign.

The United States is demanding that the Taliban significantly reduce its attacks before the two sides make their agreement final. A deal between Washington and the Taliban, which would also involve the gradual withdrawal of the remaining American troops, would open the way for negotiations between the insurgents and other Afghans, including Mr. Ghani’s government, over power sharing.

President Trump has made no secret of his desire to significantly reduce the American troop presence in Afghanistan — whether there is a peace deal or not. In his State of the Union speech, he said peace talks were continuing and reiterated his desire to end the war.