Al-Qaida and Taliban militants based close to the Afghan border have carried out a wave of bombings and shootings on government and Western targets in Pakistan over the last two years , raising fears the nuclear-armed country is spinning out of control .