A US plan to pull General David Petraeus from Afghanistan threatens to derail US efforts to build strong ties with Islamabad and Kabul and help Americans win the decade-old war against the Taliban. While President Barack Obama's decision to move Petraeus to the CIA will give him a strong voice on security issues, it opens him to criticism that he, like George W. Bush before him, is not giving the war the attention it needs for success. “We're just starting to see some momentum, some shifts, and now we're swapping out the Afghanistan commander,” said Rick “Ozzie” Nelson, an Afghanistan veteran and a fellow at the Center for Strategic and International Studies. The shake-up in Kabul — Obama will also send veteran diplomat Ryan Crocker to replace Karl Eikenberry as US ambassador —comes as the United States struggles to show it can decisively weaken the Taliban almost 10 years after the Sept. 11 attacks that triggered the war. The Obama administration will name Lieutenant General John Allen, who commanded troops in Iraq and is now deputy commander of US Central Command, to take over in September. Despite areas of improved security in southern Afghanistan, violence shows few signs of receding and foreign troops are bracing for a bloody spring fighting season only two months before Obama starts withdrawing US soldiers. In that context the decision to remove Petraeus, who has sought to apply his counterinsurgency success in Iraq to Afghanistan —is a gamble for the US president, under pressure at home to end a long war and mindful of advice from military leaders who say the Afghan fight is far from won. It was only 10 months ago when Obama, the war critic who struggled at first to find his footing with the US military leadership, suddenly asked Petraeus to effectively take a demotion and become Afghanistan commander when his predecessor, General Stanley McChrystal, resigned in a media scandal. Since then Petraeus has embodied US hopes the long-neglected Afghan campaign could be salvaged by putting more boots on the ground and winning over war-weary Afghans. Petraeus has worked to improve ties with Afghan President Hamid Karzai, strained at times due to accidental civilian deaths, and to convince Pakistani leaders like army chief General Ashfaq Kayani to crack down on militants launching attacks on US troops in Afghanistan. His departure may make it even harder to reassure Kabul and Islamabad, where some leaders have staked their futures on close ties with Washington, the United States is not quickly bolting for the exit as public support for the war drops. “It's hard to get a focused campaign and develop those relationships” when top brass don't stick around, Nelson said. The departure of the US military's brightest star may also fuel doubts about how many troops Obama, who sent an additional 30,000 US soldiers to Afghanistan after overhauling US strategy on Afghanistan in 2009, can afford to bring home starting in July. “We won't know if (Petraeus') surge strategy will work until the end of 2011, which is long after he's left,” said Joshua Foust, a fellow at the American Security Project. Obama will announce a major security shake-up Thursday, nominating CIA director Leon Panetta to replace Robert Gates as defense secretary and putting Petraeus forward to lead the US spy agency. In Afghanistan analysts expect continuity in NATO's strategy and operations as commanders seek to expand “bubbles” of improving security, which they hope will allow Afghans to resume commerce and improve governance, and as they conduct a air strikes aimed at mid- and senior-level Taliban leaders. Likewise, the US military's deep command structure could minimize the impact of Petraeus' departure, which although expected at some point comes at a delicate juncture. Allen will face challenges in Afghanistan, where violence hit its highest level in 2010 since the war began in 2001. Allen commanded troops in western Iraq as Sunni tribesmen began battling Al-Qaeda and helped staunch bloodshed there. In Afghanistan, he may struggle filling Petraeus' formidable shoes but he is not expected to deviate from a strategy US officials believe is showing positive, if tenuous, results in weakening the Taliban. Analysts said Obama's appointment of Crocker, who as US ambassador in Baghdad won wide praise for his regional expertise and skillful diplomacy, could help counteract the departure of someone with Petraeus' stature. Andrew Exum, a former Army Ranger and fellow at the Center for a New American Security, said Crocker, who also served as US ambassador to Pakistan, might be able to mend the frayed relationship with Karzai in a way that Eikenberry had not. “Ambassador Crocker has always been the best candidate for the job of ambassador in Kabul,” Exum said.