U.S. Secretary of State John Kerry held talks with Afghan President Hamid Karzai in Kabul on Friday to end a deadlock in negotiations to determine the residual presence of U.S. forces in Afghanistan after 2014, when most of the U.S.-led foreign troops are scheduled to be withdrawn.

Washington seeks to finalize a bilateral security agreement by the end of this month, but Karzai wants to delay it until after Afghanistan’s presidential election next April. If an agreement is not agreed upon within the targeted time frame, the U.S. may withdraw all its forces by the end of 2014, leading to a security vacuum that could favor the insurgents.

“Our NATO allies and the United States as well benefits from having more clarity about the type of framework that might be in place as we make decisions about our presence going forward,” a senior U.S. administration official told reporters on Friday, according to a transcript of a conference call organized by the State Department. “And similarly, as the Afghan political establishment shifts into election mode, 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 Obama administration is considering keeping a force of between 3,000 and 9,000 troops in Afghanistan after the scheduled withdrawal of U.S. forces in 2014, according to a New York Times report in January. This range is much lower than the 6,000 to 20,000 troops Marine Corps Gen. John R. Allen, the former U.S. commander in Afghanistan, is said to have previously suggested.

Talks reached an impasse because of disagreements between the U.S. and Karzai governments over Washington’s request to operate independent counterterrorism missions in Afghanistan after the pullout. Kabul wants the U.S. to share information about militant activity and let Afghan security forces handle the crackdown.

“We have articulated clearly two missions post-2014 that we have decided are in the United States national interest, and those are: training and assisting the Afghan army, and the counterterrorism mission against al Qaeda,” said one of the senior administration officials who spoke to reporters.

Another official who spoke to Reuters after Kerry held talks with Karzai said: “The differences that existed coming in were narrowed on the vast majority of the outstanding issues. At no point during the conversation did the tone veer in the direction of being sharp on either side.”