Gunmen shot to death six people and wounded 15 in an attack on a former provincial minister outside a mosque in southwest Pakistan on Friday, police said.

The attack in Quetta, the capital of Baluchistan province, came a day after a Taliban suicide bomber killed 30 people at a police funeral in the city.

Pakistan has experienced a rash of deadly attacks since Prime Minister Nawaz Sharif took office at the beginning of June, sparking criticism that the government doesn’t have a coherent plan to fight the growing problem of violent extremism in the country.

The former provincial minister who was attacked on Friday, Ali Madad Jatak, escaped unharmed, said police officer Bashir Ahmad Barohi. But six people were killed and 15 wounded, he said.

The attack took place when Mr. Jatak and a group of his supporters were coming out of a mosque after sunrise prayers marking the start of the Muslim holiday of Eid al-Fitr at the end of the holy month of Ramadan, said Mr. Barohi.

Baluchistan is home to both Islamic militants and separatists who have been waging a low-level insurgency against the government for decades.

Suspected separatists killed 13 people when they pulled off a bus in Baluchistan earlier this week, as well as a paramilitary soldier who tried to stop them.

Also on Friday, guards at a Shiite mosque on the outskirts of the capital, Islamabad, shot and killed a would-be suicide bomber before he could set off his explosives, police officer Abid Hussain said.

The attacker opened fire on the guards, wounding three of them before he was killed, said Mr. Hussain.

One of the injured guards died on way to hospital, another police officer, Mohammed Riaz said.

The identity of the attacker was not known, but Pakistani Taliban and Sunni militant groups have been blamed for previous attacks on minority Shiites in the country.

Pakistan’s new government has said it is preparing a comprehensive strategy to fight violent extremism and is planning on holding a meeting with all political parties to achieve consensus on the plan. But the strategy is yet to be released, and the meeting has not yet been scheduled.

Mr. Sharif came to power advocating peace talks with the Pakistani Taliban as the best way to crack down on violence in the country. But the Taliban declared it had no interest in holding talks after its deputy leader was killed in a U.S. drone strike.

The Taliban and their allies have been waging a bloody insurgency against the government for years that has killed over 40,000 civilians and security personnel. The militant group says it is fighting to end Pakistan’s unpopular alliance with the U.S. and also to impose Islamic law in the country.