Kerry in Kabul amid election row
The US and its allies are growing increasingly concerned as Afghanistan shows signs of unravelling in its first democratic transfer of power from President Hamid Karzai.
With Iraq wracked by insurgency, Afghanistan's dispute over election results poses a new challenge to President Barack Obama's effort to leave behind two secure states while ending America's long wars.
US Secretary of State John Kerry made a hastily arranged visit to Afghanistan to help resolve the election crisis, which is sowing chaos in a country that the US has spent hundreds of billions of dollars and lost more than 2,000 lives trying to stabilise.
He was to meet the two candidates claiming victory in last month's presidential election run-off.
"I've been in touch with both candidates several times as well as President (Hamid) Karzai," Mr Kerry said before leaving Beijing, where he attended a US-China economic meeting.
He urged them to "show critical statesmanship and leadership at a time when Afghanistan obviously needs it.
"This is a critical moment for the transition, which is essential to future governance of the country and the capacity of the (US and its allies) to be able to continue to be supportive and be able to carry out the mission which so many have sacrificed so much to achieve."
The preliminary results of the presidential election run-off suggested a massive turnaround in favour of former finance minister Ashraf Ghani Ahmadzai, a one-time World Bank economist who lagged significantly behind former foreign minister Abdullah Abdullah in first-round voting.
Mr Abdullah, a senior leader of the Northern Alliance that fought the Taliban before the American-led invasion, claims the run-off was a fraud.
His supporters have spoken of establishing a "parallel government," raising the spectre of the Afghan state collapsing. Mr Abdullah was runner-up to Mr Karzai in a fraud-riddled 2009 presidential vote before he pulled out of that run-off.
Chief electoral officer Zia ul-Haq Amarkhail has resigned, denying any involvement in fraud but saying he would step down for the national interest.
Mr Kerry will seek to persuade both candidates to hold off from rash action while the ballots are examined and political leaders are consulted across Afghanistan's ethnic spectrum.
The US wants to ensure that whoever wins will create a government that welcomes all ethnic factions.
If neither candidate gains credibility as the rightful leader, the winner could be the Taliban. Many Afghans fear the insurgent forces will only gain strength as the US military presence recedes. Internal instability could aid the insurgency.
Mr Abdullah and Mr Ghani have each said that as president they would sign a bilateral security agreement with the US, granting American forces immunity from local prosecution.
Without such an agreement, the Obama administration has said it would have to pull all US troops out of Afghanistan, a scenario that happened in Iraq three years ago. Mr Karzai has refused to finalise the deal, leaving it to his successor.
Mr Kerry will also meet Mr Karzai and UN officials.
Mr Obama spoke to each candidate this week, asking them to allow time for investigations of ballot-stuffing.