BEIJING  - Afghanistan is at a “critical moment” in its transition, US Secretary of State John Kerry said Thursday, amid a deepening electoral crisis in the country, where a presidential candidate has rejected the preliminary results.

Fears have grown that Afghanistan could see a return to the ethnic bloodshed of its 1992-1996 civil war in the aftermath of the June 14 run-off vote.

Abdullah Abdullah, a former anti-Taliban resistance fighter, came second in preliminary results to Ashraf Ghani, but Abdullah said the election was fraudulent and he expected to become the next president.

“This is a critical moment of the transition which is essential to the future governance of the country,” Kerry told reporters in Beijing, saying he hoped that in the next few days a way would be found for Afghanistan to “grab a hold of the future”. The vote base of Abdullah, a former World Bank economist, is among the Tajiks and other northern Afghan groups, while Ghani attracts much of his support from the Pashtun tribes of the south and east - an ominous echo of the ethnic divisions of the civil war.

Both men have called for the country to remain united as it faces a difficult transfer of power at the same time that 50,000 US-led NATO troops wind down their battle against Taliban insurgents and aid money declines.

Kerry said he had been in touch with both candidates “several times”, as well as outgoing president Hamid Karzai.

“We would encourage both of them to not raise expectations with their supporters, to publicly demonstrate respect for the audit process and the accountability process and also to show critical statesmanship and leadership at a time when Afghanistan obviously needs it,” he said.

Kerry spoke in China’s capital after completing annual strategic and economic dialogue talks with Chinese officials.