The end-Permian extinction 252 million years ago wiped out over 80 per cent of marine species, but many ecosystems still had complex food webs despite the losses