Image copyright EPA Image caption Afghan security forces are fighting both IS and Taliban militants in Nangarhar (file picture)

At least nine people died and 12 others were injured on Friday when a child was used to carry out a suicide attack on a wedding party in eastern Afghanistan, local officials said.

The attack took place in Nangarhar province's Pachiragam district.

Provincial spokesman Attaullah Khugyani said the child was used to target a pro-government militia commander in Friday morning's attack.

The Islamic State group (IS) later said it carried out the attack.

IS in Afghanistan, also known as IS Khorasan, is known to be active in Pachiragam.

The group has been blamed for a number of deadly attacks in Afghanistan - including a suicide bombing at a Kabul education centre last year that killed dozens of people.

The Press Trust of India news agency reported that the child used in Friday's suicide attack was a young teenager. Malik Noor, the pro-government militia commander targeted in the attack, and two of his sons were among the dead.

Pro-government militias often work alongside Afghan security forces to prevent territory falling into the hands of Taliban and IS militants

The attack comes days after a historic peace conference between Taliban insurgents and Afghan representatives saw a pledge to minimise civilian casualties. The two sides agreed on a "roadmap to peace" seen as having laid the ground for formal talks in the future.

Media playback is unsupported on your device Media caption Ogai Wardak, 18: "If the Taliban come, I will fight them"

The Taliban is negotiating with the United States in a bid to try to end the 18-year war. It hopes to reach an agreement that would see US troops pull out in return for a commitment that Afghanistan would not be used as a base for terrorism.

This is not the first time that children have been used to carry out suicide attacks. Earlier this year, two girls and one boy in Nigeria's Borno State were used as suicide bombers in a triple attack.

In Indonesia last year, two girls aged 9 and 12 were among those used to attack a church in Surabaya.