The detention of 433 Afghan asylum-seekers by Australian authorities was illegal.