Comparative transcriptome analysis on the mangrove Acanthus ilicifolius and its two terrestrial relatives provides insights into adaptation to intertidal habitats.