The attack on Pakistan 's police - who have become regular targets of the Taliban and other militant groups in recent months - came less than a month after the ambush on Sri Lanka 's visiting cricketers and underscored the threat that militancy poses to the nuclear-armed country .