LAHORE, Pakistan — At least 31 people were killed on Wednesday in a suicide bombing outside a polling station in Quetta, Pakistan, hospital officials said, raising the death toll in what has already been one of the bloodiest elections in the country’s history.

No group immediately claimed responsibility for the bombing in the southwestern province of Baluchistan, where an attack earlier this month killed more than 150 people, including a provincial assembly candidate.

The vote on Wednesday, in which a new prime minister will be elected, is only the second time in Pakistan’s 70-year history that power will be transferred from one civilian government to another.

Party officials said turnout was surprisingly strong across Lahore, one of Pakistan’s biggest cities. Many of the people who streamed out of the heavily guarded polling stations said they had voted for Imran Khan, the celebrity cricket player who has presented himself as an alternative to the family political dynasties that have dominated Pakistan for decades.