Groups linked to al-Qaeda and the Taliban have launched a wave of attacks across Pakistan in apparent revenge for the military offensives in their bastions in the northwest of the country near the Afghan border.

Ties between armed groups in Punjab, the Taliban and al-Qaeda are especially worrying for the Pakistan government, which has said the military is stretched in campaigns in the northwest.

While most of the reprisal attacks have taken place there, fighters have also stepped up operations in the country's heartland, mainly Punjab, in recent months.

More than 80 people were killed in twin attacks on the mosques of the minority Ahmadi sect in Lahore in May.

Talat Masood, a defence analyst and former Pakistan military officer, said Taliban-linked groups are exploiting the uncertainty over the government's response to such attacks.

"At the moment there is lukewarm support from the people, and the people have no confidence in the government and their governance," he told Al Jazeera on Friday.

"These people are taking full advantage of this vacuum. You can only win against militancy if you really harness the support of the people, and this is exactly what has not been done."