Wasil Ahmad had commanded a police unit for 43 days as it fought to repel a deadly 71-day Taliban siege last year, according to his uncle Mullah Samad, an Afghan Local Police commander in the Khas Uruzgan district of Uruzgan province.
Gunmen on motorbikes shot the boy in the head Monday at a market in Tarin Kowt, the provincial capital of Uruzgan province, said Dost Mohammad Nayab, spokesman for the province's governor.
Wasil was taken to a local hospital, then transferred to a better-equipped hospital in Kandahar, where he died of his injuries, Nayab said.
The Taliban claimed responsibility for the killing on its website Monday.
Wasil had only recently returned to civilian life, enrolling in school in Tarin Kowt last year after surviving the brutal Taliban siege in Khas Uruzgan, Nayab said.
Boy commanded unit
Despite his age -- and national and international laws prohibiting the use of children in warfare -- Wasil had distinguished himself on the battlefield last year, Samad, the boy's uncle, told CNN.
He said Wasil, who lost his father in fighting with the Taliban, had asked him more than a year ago how to use machine guns.
"I asked him why did he want to learn. He told me that he wanted to take revenge from those (who) had killed his father," Samad said.
Samad said he trained the boy in the use of AK-47 and PK machine guns, rockets and mortars as well as satellite phones and VHF radios.
"He was a very intelligent boy; he quickly learned all of them," he said.
Last summer, the area under the uncle's control came under Taliban siege, and Samad and some of his men were injured in an attack.
"That was when Wasil claimed the command of my men," Samad recalled, saying the boy would position himself on the roof of the family home firing his machine gun from morning to night.
"There were days that he fired up to 3,000 bullets," he said, adding that Wasil had killed a number of Taliban fighters.
"He commanded my men for 43 days in total, and at the end, we broke the siege. We were only 75 people but were fighting hundreds of Taliban."
Samad had been a Taliban commander before but switched sides in 2012 to fight for the Afghan government, he told CNN.
His brother, Wasil's father, had also been a Taliban fighter and switched sides at the same time. The Taliban killed him a year later, Samad said.
'He was very talented'
In late summer, the siege finally ended, and Samad and 35 of his forces and family members -- including Wasil -- were airlifted to Tarin Kowt, according to Samad and Nayab.
"The authorities praised our hard work, sacrifice and bravery by declaring both me and my nephew Wasil as heroes," Samad said.
Wasil then enrolled in school, hoping to join the police when he graduated, Nayab said, and his uncle hired a private teacher to provide tuition at home.
"He was very talented ... and was even able to speak some English," Samad said.
Wasil attended a few weeks of classes when school broke for the winter holidays, and then he was killed, Nayab said.
He left behind a mother, two younger sisters and three younger brothers, his uncle said.
Pakistani activist Malala Yousafzai, who survived being shot by the Taliban in 2012, told CNN that Wasil's case was "tragic."
"It's not just this one boy, but it's happened to many children and many people in that region," she told CNN's Christiane Amanpour
"It's tragic that they do not have sympathy for children, for innocent children."
Children fight on both sides, rights group says
Nayab stressed that Wasil had not been recruited into the Afghan Local Police ranks due to his age but fought to defend his family during the siege.
But Rafiullah Baidar, a spokesman for the Afghanistan Independent Human Rights Commission, said Wasil had been given a gun and police uniform in Khas Uruzgan district in spite of laws prohibiting the use of children in conflict and strict orders against the practice from Afghan President Ashraf Ghani last year.
Baidar said his organization received occasional reports of children fighting for the Afghan Local Police, but they were outnumbered by those working in the service of the Taliban.
"Anti-government forces are using hundreds of children for different activities, including fighting, transporting their ammunition and even carrying out suicide attacks," Baidar told CNN.
Children used for suicide attacks
A report, published in May by the U.N. secretary-general
, on children and armed conflict in Afghanistan found that militant groups, national security forces and a pro-government militia used hundreds of children during a period of 40 months from 2010 to 2014.
Armed opposition groups, including the Taliban, used three-quarters of those children, with most of them manufacturing, transporting and planting improvised explosive devices, according to the report.
Children also carried out suicide attacks, it said.
The report verified 38 cases of children being used by Afghan national security forces, including 27 recruited by the Afghan Local Police and one by the Afghan National Army.
Government says policy strict
Sediq Sediqqi, a spokesman for Afghanistan's Ministry of Interior Affairs, told CNN he didn't have any details about Wasil's death.
But government policy regarding the use of children in security forces was strict, he said.
"No child is recruited," he said.
"Things have improved in (the Afghan Local Police) now. (The Ministry of Interior Affairs) is serious when it comes to evaluating and controlling ALP functions."
He said the ministry would investigate to address concerns about children if the Afghanistan Independent Human Rights Commission knew of specific cases.