Twelve militants were killed in fighting between factions of the Pakistani Taliban near the Afghan border on Tuesday, Taliban and security officials said, the first such clash since the two feuding groups agreed to abide by a ceasefire two weeks ago.

The government hopes to exploit the divisions within the Pakistani Taliban, a loose alliance of dozens of militant groups. It is separate to but allied with the Afghan Taliban, who have a far clearer command structure.

The two feuding Pakistani Taliban factions are led by rival commanders from the Mehsud tribe, who provide the bulk of the Pakistani Taliban's men and money. Commander Khan "Sajna" Said supports peace talks with the government of Prime Minister Nawaz Sharif, but his rival Shehryar Mehsud does not. Peace talks have been going since February but recently stalled again. Taliban sources said that Tuesday's fighting began when Sajna's men attacked militants affiliated with Mehsud.

"We have been told that 12 people from both sides were killed and some others wounded," a senior member of the Pakistani Taliban said.

The rivalry between the two men has existed for many years, but spilled into violence last month when both claimed leadership of the Mehsud tribe. The dispute followed the death of Hakimullah Mehsud, the leader of the Pakistani Taliban, and his deputy in drone strikes last year.