Image copyright AFP/Getty Image caption During the truce Taliban militants were feted by many Afghans

The Taliban have killed about 30 Afghan soldiers in western Afghanistan in their first major attacks since a temporary ceasefire expired.

Militants stormed at least two army check points in Badghis province before ambushing reinforcements sent to help.

The Taliban also suffered casualties, officials said. The militants ended a three-day truce on Sunday as the Muslim festival of Eid al-Fitr ended.

The government said it would continue to observe a unilateral ceasefire.

Jamshad Shahbi, a spokesman for the provincial governor, said at least 10 soldiers were killed in an overnight attack in Merghab district, and a further 19 were killed when a convoy of reinforcements was ambushed and hit by roadside bombs.

Mr Shahbi also said 16 suspected militants died, but there was no way of confirming that figure.

Abdul Aziz Bek, the head of the provincial council, told Reuters news agency that "large numbers of Taliban came from several directions".

"After hours of heavy fighting 30 Afghan security forces were killed and the Taliban captured the base," he said.

Unconfirmed reports suggested attacks on other security posts in the same district. Provincial officials accused the Taliban of using the truce to prepare the attacks.

Media playback is unsupported on your device Media caption Tears, hugs and selfies as Afghan troops and Taliban mark a truce for Eid

The Eid ceasefire saw unprecedented scenes in Afghanistan, as soldiers and Taliban insurgents hugged one another.

But on Sunday the militants said the ceasefire would not be extended. President Ashraf Ghani said the government would continue its unilateral truce for 10 days.

The ceasefire was the Taliban's first since the government it ran was toppled in a 2001 US-led invasion. Tens of thousands of Afghans have been killed since then.

In February, Mr Ghani offered the militants peace talks "without preconditions" and recognition of the Taliban as a legitimate political group if they respected the rule of law.