QUETTA, Pakistan — Hundreds of Pakistanis rallied Sunday against an Islamic State suicide attack that targeted a politician seen as close to the Afghan Taliban.

The protesters in Quetta, the capital of the southwestern Baluchistan province, called on the government to take action to dismantle the IS affiliate, which has a growing presence in South Asia alongside the Taliban and other extremist groups.

The suicide attack on Friday, which killed 28 people, targeted Abdul Ghafoor Haideri, deputy leader of Pakistan’s Senate, who narrowly escaped the blast.

Haideri’s Jamiat-e-Ulema Islam is a pro-Taliban Islamist party that is allied with the ruling party of Prime Minister Nawaz Sharif, illustrating the Pakistani government’s complex ties to Islamic extremists, some of which it views as allies in regional power struggles with Afghanistan and India.

Pakistan has long tolerated and maintained informal links to the Afghan Taliban, many of whom studied at seminaries operated by Haideri’s group. The government has meanwhile waged a series of military operations against the Pakistani Taliban, who espouse similar views but carry out attacks inside Pakistan.

In neighboring Afghanistan, an Islamic State affiliate is at war with both the U.S.-backed government and the Taliban, with whom it is bitterly divided over leadership and tactics. Friday’s bombing was likely directed against the Taliban.

Rallies protesting Friday’s attack were also held in other parts of Pakistan, said Hafiz Hamdullah, an aide to Haideri.

Elsewhere in Pakistan, gunmen ambushed a vehicle in a northwestern tribal region bordering Afghanistan, killing a government official and his paramilitary guard, said Irfan Khan, a local official.

Another two paramilitary troops were wounded Sunday in a roadside bomb attack in Quetta city.

Lashkar-e-Jhangvi, another extremist group considered close to IS, claimed responsibility for both attacks.