WASHINGTON — Frustrated with his Afghan counterpart, President Barack Obama is ordering the Pentagon to accelerate planning for a full US troop withdrawal from Afghanistan by the end of this year. But Obama is also holding out hope that Afghanistan's next president may eventually sign a stalled security agreement that could prevent the US from having to take that step. Obama spoke Tuesday with Afghan President Hamid Karzai, the first direct conversation between the two leaders since last June. The White House has become increasingly frustrated with Karzai, who has refused to sign a security pact that the White House says is crucial to keeping a US troop presence in Afghanistan after the war formally concludes at the end of this year. With no sign that Karzai will sign the agreement, White House spokesman Jay Carney said Obama “has tasked the Pentagon with preparing for the contingency that there will be no troops in Afghanistan beyond 2014.” However, he added that the US remains open to keeping troops in Afghanistan if an agreement can be signed later this year, likely after the April Afghan elections. That decision appeared aimed at marginalizing Karzai's role in the high-stakes negotiations over the future of the lengthy American-led war. The Afghan leader has deeply irritated Washington with anti-American rhetoric, as well as with his decision this month to release 65 prisoners over the objections of US officials. The White House insists it won't keep any American troops in Afghanistan after December without a security agreement giving the military a legal basis for staying in the country. While the White House did not publicly set a deadline for finalizing the agreement before that time, officials said the size and scope of any US mission could shrink the longer Obama waits. Despite the troubled ties between Washington and Kabul, many of Obama's advisers want to see American troops stay in Afghanistan after the war ends. The Pentagon envisions keeping up to 10,000 troops in Afghanistan to focus on counterterrorism and the training of Afghan security forces, though some White House advisers would prefer keeping fewer troops, if any. The US military has also drawn up blueprints for a full withdrawal, and Tuesday's developments appeared to push that idea closer to the forefront of Pentagon planning. Obama's call with Karzai coincided with key military meetings on Afghanistan. Defense Secretary Chuck Hagel will meet with his NATO counterparts in Brussels later this week. And the chairman of the Joint Chiefs of Staff, Gen. Martin Dempsey, arrived in Afghanistan on Tuesday to visit US military leaders in the country and assess the security situation on the ground. Dempsey, speaking to reporters traveling with him, said that while the US remains committed to helping Afghanistan after this year, “I can't ask the young men and women to serve in a country without the protections afforded by a bilateral security agreement.” “We are at a point where we have to begin planning for other options,” Dempsey said. The prospect of a full American withdrawal has led to concern among Afghanistan's neighbors, most notably Pakistan, where officials have warned that a civil war could break out and further destabilize the region. Pakistani officials also worry that Afghan security forces will fracture and as many as one-third of the force could desert without continued US assistance. The US and Afghanistan agreed to details of a security pact last year, and the agreement was also endorsed by a council of 3,000 Afghan tribal elders known as the Loya Jirga. But Karzai caught US officials off guard by then declaring he wanted his successor to sign the agreement. It's unclear whether Afghanistan's new president will be any more likely than Karzai to do so. There is no clear front-runner among the 11 candidates running to replace the president, who is constitutionally ineligible for a third term and has not endorsed a successor. Among those running are Abdullah Abdullah, who was the runner-up to Karzai in disputed 2009 elections; Qayyum Karzai, a businessman and the president's older brother; and Ashraf Ghani, a former finance minister and academic. Most of the candidates are familiar to US officials. The longer the US waits to decide on its future in Afghanistan, the more expensive and risky a full withdrawal would become. With less time to move troops and equipment, the military will have to fly assets out rather than use cheaper ground transportation. The Pentagon's biggest challenge will be closing large military facilities, including the Bagram and Kandahar air bases. Shutting down a massive base typically takes about 10 months, but military officials said they are prepared to do it in a much shorter period if necessary, although that would be far more expensive. Military officials said commanders would still like to have about six months. The Pentagon is currently planning to cut the total American force in Afghanistan to as low as 20,000 by midsummer, giving commanders the ability to pull all troops out by Dec. 31 if no agreement is reached. There are currently about 33,600 US troops in Afghanistan. — AP