Petraeus, widely credited with turning the tide in Iraq, left to take over the CIA with his signature counterinsurgency strategy having yet to deliver a safer Afghanistan or push the Taliban to reconcile with the country’s Western-backed government.

Allen is known for helping turn Sunni insurgents against al-Qaida in Iraq in one of that war’s most pivotal stages. In Afghanistan, he will be tasked with the overseeing the start of the American troop withdrawal this month even as insurgents step up the violence and attacks on high-profile Afghans, including the assassination last week of President Hamid Karzai’s powerful half brother and the slaying of a close Karzai aid on Sunday.

Allen said the drawdown of U.S. forces and the transition of some areas to Afghan control this week does not mean international forces are easing up in their campaign to defeat the Taliban insurgency, though he acknowledged the fight won’t be easy.

“It is my intention to maintain the momentum of the campaign,” Allen said at the handover ceremony in the Afghan capital. “There will be tough days ahead. I have no illusions about the challenges.”

Allen, who takes command of about 130,000 U.S. and NATO troops, has said he supports President Barack Obama’s plan to withdraw a third of the U.S. forces in Afghanistan by next year.

But Allen told a Senate hearing last month that the schedule set by Obama was more aggressive than the military had anticipated. Obama did not set a minimum number of troops to be pulled out this month, but required only that 10,000 be gone by the end of the year and that another 23,000 be back home by September 2012.

As it draws down, the U.S. is hoping for results from an ambitious and costly multibillion dollar plan to build the Afghan security forces.

All foreign combat forces are set to leave Afghanistan by the end of 2014, and Allen has said he hopes the drawdown will impress on Afghan leaders that they must urgently grow the number and capabilities of their own security forces to take over.

The Afghan government plans to have 305,000 trained soldiers and policemen by this October with a goal of just under 400,000 by the time foreign combat troops leave.

There have been fears in Afghanistan that the U.S. decision to draw down could lead to a precipitous withdrawal of other foreign troops.

Afghan Defense Minister Abdul Rahim Wardak said he hoped Petraeus‘ appointment to the role of CIA director will temper calls for a quick withdrawal of U.S. forces and funding.

“His broad intellect, his unmatched experiences and knowledge of the ground realities will make him a counterbalance to all those shortsighted, politically inspired isolationists and the groups of Beltway bandits, and U.S. national security councils,” Wardak said. “Any wavering of the resolve or premature drawdown and exit strategy will put in jeopardy all that we have achieved.”

A Petraeus leaves, it remains unclear whether his strategy — with an emphasis on protecting the local population and decisive strikes against insurgents — has made Afghanistan any safer.

Last week, the United Nations reported that the number of Afghan civilians killed in war-related violence rose 15 percent in the first half of this year.

The U.N. report attributed 80 percent of the civilian deaths to insurgents and others fighting against the Afghan government — up from 75 percent in the first six months of the year. International troops and other pro-government forces were to blame for 14 percent of the deaths; 6 percent were not attributed to any party to the conflict.

When Petraeus took over a year ago, he brought in more than 30,000 troops in a surge designed to bolster his counterinsurgency plan.

His commanders employed a strategy that brought some success in Iraq — coupling military force with an ambitious, troop-intensive plan to push insurgents from their strongholds so the local government could build a system of services and institutions to win the loyalty of the people.

It hoped to create the necessary groundwork for a process of reconciliation and reintegration to encourage insurgents to re-enter Afghan society.

But vast areas of Afghanistan remain without good schools, reliable electricity and other government services, and the Taliban, which began an offensive in April, shows little sign of wanting to engage Afghan leaders in peace talks.

Adm. Mike Mullen, chairman of the Joint Chiefs of Staff said that although there “is a long way to go,” the fact that “we have achieved a level of success deep enough to begin drawing down our surge forces stands as a testimony to Dave’s leadership and the strength of the strategy itself.”

But the plan has been costly, with the United States now spending about $10 billion a month to fund the effort in Afghanistan. Some of his detractors have argued Petraeus‘ strategy has been lagging and that a more aggressive special operations-centered counterterrorism strategy may be more effective.

In violence Monday, seven Afghan police officers were killed at a checkpoint near the capital of southwestern Helmand, said Daoud Ahmadi, a spokesman for the governor’s office. He did not have any other details about the incident.

A bomb also killed three international service members in the east, and another explosion in the south killed one service member, NATO said in a statement. It did not provide nationalities or further details.