The bomb was detonated by remote control as Hakim Khan and five lower ranking militants were driving through the town of Marindy in the Kurram tribal region, said Jamil Khan, a local administrator. The commander who was killed was suspected of attacking Pakistani troops and kidnapping people for ransom, he said.

It was unclear who carried out the attack, but rivalries between different groups of fighters in northwestern Pakistan sometimes escalate into violence.

The slain commander was from Kurram but had close ties to the Pakistani Taleban, an umbrella group of militants that is based in nearby North and South Waziristan and has declared war on the Pakistani state, Khan said.

Kurram, which is located along the border with Afghanistan, has experienced frequent militant attacks in the past few years. The Pakistani military has targeted the area with troops and airstrikes in an attempt to beat back the militants, but violence has persisted.

The Pakistani government is also grappling with a rising wave of politically motivated killings in the country’s largest city and main economic hub, Karachi. At least 52 people were killed this week in four days of violence sparked by a contentious local election.

The southern port city of about 16 million people began to return to normal Thursday, with schools and offices reopening, said Sharmila Farooqi, a provincial government spokeswoman in southern Sindh province.

“People are back to work and there is a normal flow of traffic on the roads,” said Farooqi.

Parts of the city shut down on Wednesday in response to the wave of killings.