Terror link to South Africa after gun battle