Media playback is unsupported on your device Media caption The attack razed most of Nabi Hanafi's compound to the ground

At least 15 people have been killed in a suicide bomb attack on a militant commander's compound in a north-west Pakistani tribal region, officials say.

Reports said the commander, Nabi Hanafi, had been fighting a branch of the Pakistani Taliban (TTP). Some reports say that he has been injured.

The Taliban have said they were behind the attack in the remote Spin Thal area of North Waziristan.

Last year a TTP suicide attack hit the same compound, killing 18 people.

Officials said that in Thursday's attack a suicide bomber drove a vehicle into the compound.

Several other people were injured in the attack.

Security officials have said that Nabi Hanafi was injured in the attack and taken to hospital, the Reuters news agency reported.

But other reports say it is still not clear if he was injured or if he was even in the compound when the bomb went off.

Analysis Thursday's attack is the continuation of in-fighting in the TTP ranks that dates back to the death of its chief, Baitullah Mehsud, in a drone strike in August 2009. While Mehsud made alliances with militant groups across the tribal regions, he allowed local strongmen in each region to head those groups. But he appointed his own fellow tribesman, Hakimullah Mehsud, to head groups in the neighbouring tribal districts of Kurram and Orakzai. This created unrest and tensions among local groups in both districts. Mullah Nabi Hanafi, an Orakzai tribesman, aspired to lead the TTP's Orakzai chapter. But he fell out with the organisation in 2008 when Hakimullah Mehsud was sent to take charge there. Since then, nearly 50 men have died on both sides in clashes between the two groups.

Witnesses told the BBC that the attack took place early on Thursday morning. There was an exchange of gunfire after which the attackers rammed an explosives-laden vehicle into the compound.

Most of the dead and injured belong to Mullah Hanafi's group, they said, but there were also some civilians among the casualties. A woman and a child were injured.

Two suicide bombers who tried to launch a second attack were killed in a shoot-out by Mullah Hanafi's men, security force sources told Reuters.

A number of houses in surrounding areas were damaged by the explosion and soldiers from the nearby garrison town of Tull cordoned off the area.

Police told the Dawn newspaper that Mullah Hanafi's most of the compound was destroyed by a "huge explosion".

Mullah Hanafi is from the Orakzai tribal area, part of the semi-autonomous tribal areas bordering Afghanistan which are a stronghold for Pakistani Taliban and al-Qaeda-linked militants.

He was once closely associated with the TTP - widely seen as a veteran Taliban operative - but switched sides in early 2008 to fight them with his own militia.

He is thought to have been angered over the decision of former TTP chief Baitullah Mehsud to appoint Hakimullah Mehsud as the organisation's head in Orakzai.

After the rift, Mullah Hanafi set up his base in the Spin Thal area.

There have been frequent clashes between his men and TTP operatives in which more than 40 people have died so far.

The Pakistani government is reported to have provided some support to his group as part of its strategy of trying to counter the threat posed by the TTP.

The attack comes against a backdrop of apparent rifts within the ranks of the Pakistani Taliban over an offer of talks by new Prime Minister Nawaz Sharif.

There are dozens of militant groups operating under the banner of the TTP.

The BBC's M Ilyas Khan in Islamabad says that the latest violence may be the result of an ongoing feud between the TTP's Mehsud leadership and some non-Mehsud warlords whose areas the TTP have tried to bring under their direct control.

All have sanctuaries in the tribal areas near Peshawar in the north-west - some favour talks, while others do not, correspondents say.

Peshawar, the main city of Khyber Pakhtunkhwa province, has been hit by a series of recent bomb attacks, some claimed by - others blamed on - Taliban insurgents.