Gunmen first attack police post and suicide bomber later detonates explosives in northwestern town of Dera Ismail Khan.

Islamabad, Pakistan – At least eight people have been killed and more than 30 wounded in twin attacks in the northwestern Pakistani town of Dera Ismail Khan, according to police.

Gunmen on motorcycles first attacked a police post in the west of the city, killing two policemen early on Sunday, district police chief Saleem Riaz said. The four attackers fled the scene.

Later, a female suicide bomber detonated her explosives when the policemen’s bodies were brought to a government hospital.

“In addition to those killed in the [firing], two policemen and four civilians were killed in the hospital explosion,” Riaz said.

At least 30 people were wounded from the force of the explosion at the District Headquarters hospital, he added.

“About seven kilograms of explosives were used,” Riaz said.

The Tehreek e-Taliban Pakistan armed group claimed responsibility in an emailed statement, saying the attack was “in revenge” for the killing of a commander by police in Dera Ismail Khan.

The statement also said the suicide-bomb attacker was a man, naming him as Abu Obaida Ghazi, in contradiction to the initial police reports that it was a female bomber.

Pakistan has been battling the Tehreek e-Taliban Pakistan and its allies since the group was formed in 2007, aiming to impose a strict interpretation of Islamic law on the country.

A series of military operations has weakened the group, displacing it from its erstwhile headquarters in Pakistan’s northwestern tribal areas, which Dera Ismail Khan neighbours.

Overall violence has dropped from its peak in 2009, but sporadic attacks against security and civilian targets do continue to occur, however.

At least eight people have been killed in twin attacks in the town of Dera Ismail Khan [Azmat Gul/News One/Al Jazeera]

Historic polls

Historic elections took place in the region on Saturday, with residents of the northwestern tribal districts voting for the first time in provincial assembly elections, after Pakistan’s law and constitution were extended to the previously semi-autonomous area last year.

At least three incidents of violence were reported from South Waziristan district, which Dera Ismail Khan borders, on polling day, according to local journalists.

Results have begun to come in those polls, with Pakistan’s Election Commission declaring winners in 11 of the 16 constituencies that were contested.

Prime Minister Imran Khan’s ruling Pakistan Tehreek-e-Insaf party has taken three seats, with four taken by independent candidates, and one each by the Jamaat-e-Islami, Jamiat Ulema Islam (Fazl) and Awami National Party, official results showed.

Asad Hashim is Al Jazeera’s digital correspondent in Pakistan. He tweets @AsadHashim