Three of the attackers detonated their explosives inside the police station [EPA]

Gunmen wearing police uniforms and explosives have stormed a police station in northwestern Pakistan, killing one officer and three civilians, and wounding eight people, a police official has said.

During hours of fighting with police, three of the men, who attacked the headquarters in Dera Ismail Khan, detonated their explosives inside the building.

According to local media, another attacker was shot dead by soldiers as he tried to scale a wall.

His body remained dangling from the wall until it was brought down by soldiers after the operation was over.

Interior Minister Rehman Malik said details of the operation were still unclear.

"I think the position will become clearer by evening. The latest position is that the DPO (District Police Officer) has been injured," he told reporters in Islamabad.

"Some of our people have been martyred, and some have been injured. We will give you the full details when we get more information."

The Pakistani Taliban claimed responsibility for the attack.

Dera Ismail Khan is located close to Pakistan's South Waziristan tribal region, where Pakistani forces have been conducting operations against fighters since 2009.

Source: Agencies