A bomb attack claimed by the Taliban near an election rally in Bannu killed two people and injured six including a candidate on Sunday, police said.

The roadside bomb exploded in the town of Bannu where Adnan Wazir, a former legislator from the secular Awami National Party (ANP) in Khyber Pakhtunkhwa province, was heading a convoy of dozens of vehicles to address the rally,

"The remote-controlled bomb hit the convoy and damaged several vehicles. Two people later died in hospital," Nisar Ahmed Tanoli, a senior police official told AFP.

Wazir, a candidate for the Khyber Pakhtunkhwa provincial assembly in the May 11 national and local polls, was among six injured.

Bannu is close to the lawless tribal area along the Afghan border where Taliban and other Islamic militants have hideouts.

The Tehreek-e-Taliban Pakistan (TTP) claimed responsibility for the bombing and threatened more attacks against the ANP.

"We claim responsibility for the attack. We are against ANP and Adnan Wazir was a part of the ANP government for five years," TTP spokesman Ehsanullah Ehsan told AFP by telephone from an undisclosed location.

The TTP has previously made death threats against politicians from the secular ANP, which ruled Khyber Pakhtunkhwa from 2008 until the provincial assembly was dissolved pending the election.

"We have directed our associates in Khyber Pakhtunkhwa to target ANP election rallies and all its leaders," Ehsan said.

Violence has been increasing in the northwest as Pakistan prepares to hold a general election and provincial elections on May 11, which will mark the country's first democratic transition of power.

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.