A suicide bomber attacked a volleyball tournament in eastern Afghanistan today, killing at least 45 people, officials said.

Dozens more were wounded when the bomber, who was on foot and mingling with the crowd, detonated his explosives, said Mokhis Afghan, spokesman for the governor of Paktika province.

He said the attack happened during an inter-district volleyball tournament attended by large crowds in Yahyakhail district this afternoon.

"There were too many people gathered in the one place to watch the game. Dozens of others are wounded and we have reports that many of them are in critical condition," Mr Afghan said.

"We need urgent help from the central government because we might need to transfer wounded people to Kabul for treatment."

Paktika, bordering Pakistan, is one of Afghanistan's most volatile regions where a Taliban-led insurgency is waging an intensifying war against the government in Kabul.

Today's attack is one of the deadliest so far this year at a time when attacks are escalating alongside a contentious election and the inauguration of President Ashraf Ghani in September.

Afghanistan's parliament approved agreements today with the US and Nato allowing international troops to remain in the country past the end of this year.

Mr Ghani's first act after becoming president was to sign the agreements, which are bitterly opposed by the Taliban and other insurgent groups.

US President Barack Obama wants all US troops to be out of Afghanistan by the end of 2016, as his presidency draws to an end.