KABUL, Afghanistan — A bomb exploded on Friday at a mosque in Pakistan frequented by the Taliban’s supreme leader, killing at least one of his brothers and several others, Afghan officials said.

The bombing near the city of Quetta came just as American and Taliban negotiators were nearing a deal that could end the war that began with an American invasion 18 years ago.

Exact news on the well-being of Mawlawi Haibatullah Akhundzada, the Taliban chief, was not available, although officials suggested it was unlikely he was at the mosque during the explosion. Two senior Afghan officials said at least one, if not two, of Mawlawi Haibatullah’s brothers were killed, including Hafiz Ahmadullah, the mosque’s imam. One of the officials said the Taliban chief’s son was among the wounded.

A Pakistani official in Quetta said the target had been Mawlawi Haibatullah himself, and the bomb was planted because he was expected to lead the Friday prayer. But the Pakistani official said the Taliban chief had not arrived at the mosque and Hafiz Ahmadullah led the prayer instead.