U.S. General David Petraeus has stepped down as commander of NATO troops in Afghanistan amid rising violence in the country.
Handing down command of U.S. and NATO-led troops to become CIA chief on July 18, Petraeus warned those attending the handover ceremony of the need to be "clear-eyed about the challenges that lie ahead."
His successor, U.S. Marine Corps Lieutenant General John Allen, said he would maintain the campaign's momentum.
"There will be tough days ahead and I have no illusions about the challenges we will face," he said, adding that he was certain "that brave men and women of 49 nations, shoulder to shoulder, will with our Afghan partners, continue this great work and throughout we will keep our eyes on the horizon."
As a reminder of the challenges that have to be confronted, three NATO troops were killed by a bomb in eastern Afghanistan on the same day.
The incident comes after insurgent gunmen wearing explosives killed a close aide to Afghan President Hamid Karzai after storming his house on the night of July 17.
Ambulances arrived at the residential compound of Jan Mohammed Khan, the former governor of Oruzgan Province, but were too late to save him. He was killed along with Mohammed Hasham Watanwal, a member of parliament from Oruzgan.
Khan's house is in a heavily fortified residential neighborhood in western Kabul, where the insurgents fought a gun battle with Afghan security forces before Afghan National Army commander Qadam Shah Shahim confirmed the deaths to reporters.
Shahim said that two insurgents killed Khan and Watanwal and then were "shot by police and the situation is now under control."
Khan was an influential and controversial figure some called a warlord. He was removed as governor of the southern Oruzgan Province in 2006 after pressure from Dutch officials concerned about his alleged links to the drug trade.
The Taliban has claimed responsibility for his death, saying he was targeted for helping NATO forces carry out raids against Afghans.
The killings come less than a week after Karzai's powerful half-brother, Ahmad Wali Karzai, the head of Kandahar's elected provincial council, was shot dead by a close associate. It was a serious blow to the president, as his brother was seen as key for Afghan and NATO operations in the Taliban's southern stronghold.
The series of killings is raising concerns that insurgents are setting back progress in Afghanistan despite recent gains made in the south after a U.S. troop surge under President Barack Obama. The rising violence comes as Afghan forces begin a transition to control of their own security and foreign troops start to leave the country.
On July 17, ministers flew to central Bamiyan Province, one of the calmest areas in Afghanistan, for a handover ceremony from New Zealand forces to Afghan police. Afghan Defense Minister General Abdul Rahim Wardak called it a "great day for Afghanistan."
"It is a pleasure that today we are starting fundamental changes in the governing of Afghanistan in the political, social and economic spheres," Wardak said.
Bamiyan is the first of seven regions to be passed to Afghan control, the first step in a slow process to put Afghan forces in control across the country by the end of 2014.
The ceremony took place amid heavy security after the Taliban threatened to target transition events. None of the nearly 200 New Zealand troops stationed in the region are expected to leave for at least another year.
Despite improvements in the south, insecurity has been spreading in formerly peaceful northern areas and in the east.
Last month a group of suicide bombers stormed Kabul's Intercontinental Hotel, killing a dozen people during an hours-long battle with Afghan security forces that ended when NATO helicopters killed the insurgents.
A UN report says the first six months of this year have been the deadliest for civilians since the Taliban were driven from power in 2001.
Petraeus, who oversaw the troop surge after being been credited with turning around the U.S.-led war in Iraq, is stepping down to head to Central Intelligence Agency.
He took over in Afghanistan last year to manage the deployment of more than 30,000 U.S. troops to Afghanistan.
But some of them have already left Afghanistan as part of Washington's planned drawdown of about a third of the 100,00 U.S. forces over the next year.
Canada is set to withdraw its 2,900 combat troops by the end of the month.
compiled from agency reports