Militants attacked a military checkpost in Pakistan's troubled northwest early Saturday, killing six soldiers and two civilians, officials said.

"Six security personnel and two civilians were killed in the attack," a security official said of the raid which happened around 240 kilometres (150 miles) south of Peshawar, the capital of Khyber-Pakhtunkhwa province.

The attack was on a joint checkpost of the Pakistan army and a paramilitary force in the Sari Norang area of Lakki Marwat district, close to the semi-autonomous tribal belt infested with Taliban and Al Qaeda-linked militants.

"The civilian casualties include a child and a woman who were killed when one of the attackers entered their home and blew up his suicide jacket," the official said.

Another security official in Peshawar said security forces killed 12 militants. The Taliban claimed the attack but disputed 12 militants were killed, saying they had sent only 4 suicide bombers.

"We sent only four suicide bombers to attack this checkpost. We attacked it to avenge the killing of two of our friends in a recent drone strike," Ehsanullah Ehsan, a spokesman for Tehrik-e-Taliban Pakistan (TTP), told AFP by phone.

"The Pakistan army and security forces provide assistance to the US for drone strikes. So, we are taking revenge for their cooperation with the US."

Taliban and Al-Qaeda-linked militants are accused of plotting attacks from the tribal belt on Pakistani, Afghan and Western targets.

Pakistan came under huge US pressure to do more to destroy militant sanctuaries after US Navy SEALs found and killed Al-Qaeda leader Osama bin Laden in the Pakistani military town of Abbottabad on May 2, 2011.

Pakistan says more than 35,000 people have been killed as a result of terrorism in the country since the 9/11 attacks on the United States.