Two attacks targeting election offices in Pakistan have killed six people and injured nine others, in the latest violence ahead of historic polls next month.

Five people were killed and eight injured in the country's commercial hub, Karachi, when a bomb exploded outside the office of secular Muttahida Qaumi Movement (MQM) party late on Thursday, police said.

"The bomb was planted in a motorbike," Amir Farooqi, a senior police official, said.

MQM was a coalition partner in the government that resigned last month after completing its term. 

Party spokesman Qamar Mansur said the office was closed following a bomb blast on Tuesday which killed four people.

"All the victims were standing outside the office when the bomb exploded," he said.

Earlier on Thursday a grenade attack on an election office in southwest Pakistan killed one person and injured another.

Senior government official Shah Irfan said two men riding a motorcycle threw the grenade at the election office of Sardar Umar Gorgage, a provincial leader in the Pakistan People's Party (PPP), which is seeking re-election at the ballot box on May 11 after five years in power.

Irfan said the attack took place in Nushki district, about 170km west of Quetta, the capital of the troubled oil and gas-rich province of Balochistan, which borders Afghanistan and Iran.

There was no immediate claim of responsibility but the Pakistani Taliban has directly threatened the outgoing coalition partners, the PPP, Awami National Party and MQM, which are perceived as secular.

Upcoming national polls should see power pass from a civilian government that has served a full term to another through the ballot box for the first time in the country's turbulent history.

Source: Agencies