A bomb claimed by the Pakistani Taliban has killed 20 soldiers and wounded more than 30 after it ripped through a military convoy in the northwest.

The attack happened in the city of Bannu, near the North Waziristan tribal region which is a known stronghold of militants linked to the Taliban and Al-Qaeda.

"A vehicle-borne improvised explosive device caused the blast," a senior military official said, adding the exact circumstances were unclear.

"The explosion took place in one of the vehicles of the convoy, killing 20 soldiers and wounding more than 30," he said on condition of anonymity.

The official said the convoy was about to leave for the town of Razmak in North Waziristan when the blast hit one of the civilian vehicles hired to move troops.

A Frontier Corps official confirmed the attack and casualties.

Tehreek-e-Taliban Pakistan (TTP) spokesman Shahidullah Shahid claimed responsibility.

"It was part of our fight against a secular system," he told AFP by telephone from an undisclosed location.

"We will carry out more such attacks in future."

Taliban insurgents have led a bloody campaign against the Pakistani state in recent years. They have carried out hundreds of attacks on security forces and government targets, mainly in the northwest.

Pakistan, which joined the US-led "war on terror" in 2001, has since July 2007 been gripped by a local Taliban-led insurgency concentrated largely in the northwest.

It says more than 40,000 people have been killed in Pakistan since 2001 by militants who oppose Islamabad's US alliance.