Minst åtta döda i skjutningen som utreds som terror.