A Pakistani police official says five people were killed in Karachi when a bomb exploded outside an election office of one of the country's main political parties.

The blast comes a little more than two weeks before Pakistanis go to the polls in the country's nationwide elections.

Senior police official Amir Farooqi says the bomb that exploded Thursday night had been planted outside an office used by the Muttahida Quami Movement, a liberal, secular party headquartered in the port city.

The officer said nine people also were wounded by the bomb, which was attached to a motorcycle.

Taliban spokesman Ahsanullah Ahsan claimed responsibility for the attack.

The Taliban has been targeting political parties such as MQM, which it views as a threat.