Betalains are alkaloid pigments found in certain members of Caryophyllales, including species that frequent sand dunes and salt marshes. Their functions have received scant scientific attention, but recent work on Disphyma australe suggests that betalains might assist plants to cope with a major environmental stress, saline soils. This NZ iceplant exists in two forms: red- or green-leafed. The red, betalainic form is more abundant on saltier substrates closer to the shoreline; the green form lacks betalains, and is increasingly dominant in the less saline sands further up the dunes. When the red form is grown on a salt-free medium its leaves lose their red pigmentation; if then exposed to NaCl, they quickly synthesise five structurally different betalains, giving an intense red colour in leaf epidermal cells. These red plants show none of the symptoms normally associated with salinity stress. By contrast, the green form, when treated with NaCl, does not synthesise betalains; it shows an abrupt decline in photosynthesis, a large build-up of reactive oxygen species, and arrested growth. When green leaves are infused with a betalain precursor, L-DOPA, they produce red betalains in epidermal cells. These newly reddened leaves are now as salt-tolerant as the naturally red leaves. Betalains appear to function both as a light screen to prevent photo-oxidative damage in chloroplasts compromised by salinity stress, and as a mechanism to divert Na+ away from salt-sensitive photosynthetic tissues. These alkaloids add an important contribution to the suite of mechanisms employed by plants to combat salinity.