KABUL—U.S. Secretary of State John Kerry on Friday urged Afghanistan's presidential contenders to resolve a standoff over disputed election results, seeking to mediate a crisis that risks splitting the country along regional and ethnic fault lines.

Mr. Kerry, who helicoptered into the fortified U.S. Embassy in Kabul under cover of darkness early Friday morning, is trying to broker an election audit deal that would preserve the country's democratic process and ensure a peaceful transfer of power from President Hamid Karzai...