* Kerry makes unannounced visit to Afghanistan
* U.S. hoping for security deal by end-October
* Karzai says deal can wait until after April vote
By Lesley Wroughton
KABUL, Oct 11 (Reuters) - U.S. Secretary of State John Kerry and Afghan President Hamid Karzai narrowed differences in initial talks on Friday on terms for a future U.S. military presence in Afghanistan after 2014, a U.S. official said.
Washington says it wants a deal done by the end of October but talks have stumbled over two issues that have become deal breakers for Kabul. Karzai has declared it can wait until after presidential elections in April next year, further straining what has become a rocky relationship between the allies.
"The differences that existed coming in were narrowed on the vast majority of the outstanding issues," a senior State Department official said, speaking on condition of anonymity.
The official said Kerry and Karzai will meet again on Saturday but declined to say whether enough progress was made to strike a deal on the Bilateral Security Agreement by the end of this month.
The pact will determine the presence of U.S. forces in Afghanistan after most are withdrawn in 2014. Failure to reach a deal could prompt Washington to pull out all of its forces at the end of 2014, an outcome known as the "zero option".
The talks over the pact have stalled over two points.
One is a U.S. request to run independent counter-terrorism missions on Afghan territory, which have long infuriated Karzai. The Afghans instead want the United States to pass on information and let them handle the action.
The second sticking point is a U.S. refusal to guarantee protection from foreign forces as it could lead to offensive action against another ally, neighbouring Pakistan.
The official described the talks as candid but constructive, covering areas where differences exist including demands by Afghanistan for more access to U.S. intelligence.
Karzai raised with Kerry the recent capture by U.S. forces of Latif Mehsud, a senior commander with the Pakistani Taliban, the official added. "At no point during the conversation did the tone veer in the direction of being sharp on either side."
Their talks at Karzai's presidential palace lasted about three hours and included a 10-minute private conversation, the official said. Kerry was joined by the U.S. ambassador to Afghanistan, James Cunningham, and General Joseph Dunford, the top U.S. general to Afghanistan.
U.S. officials said earlier Kerry did not intend to close a deal on the Bilateral Security Agreement (BSA) during the visit.
"This is really about us building momentum for the negotiators and helping establish conditions for success of the negotiations going forward," another State Department official told reporters.
The Washington Post reported on Thursday that the White House was increasingly willing to abandon plans for a long-term partnership with Afghanistan. While the Pentagon has pleaded for patience, the rest of the administration was fed up with Karzai and sees Afghanistan as a fading priority, the newspaper said.
"The Afghans' primary goal with the BSA is to come up with an agreement that meets their security needs, and we fully believe that what's on the table right now would do that," the State Department official said.
The collapse of similar talks between the United States and Iraq in 2011 - triggered partly by Baghdad's refusal to provide immunity to U.S. soldiers serving there - led to the United States pulling its troops out of the country.
Washington is concerned that as Afghan election campaigning intensifies it will be harder to broker a deal. Indeed, Karzai's brothers this week began their campaign to take power and plan to offer the outgoing president, who is constitutionally barred from running again, a position in their government.
The election is considered the most crucial since the U.S.-led overthrow of the Taliban in 2001, which brought Karzai to power, and an opportunity to push the country away from years of damaging allegations of corruption and maladministration.
"It's going to be more difficult for them to focus on getting to a resolution of these issues, so we'd like to bring them to a close before we get to that point," the U.S. official said.