The attacks on two churches by a single assailant on Wednesday night have shaken the city near the southern tip of Spain across from a bay from Gibraltar.