A perennial herb of the middle and upper zones of saltmarshes, coastal turf, rocks and cliffs, on coastal heaths and occasionally on shingle beaches and inland saltmarshes. In the uplands it is found in species-rich pastures, on stream banks, rock ledges and scree, and in stony flushes. It occasionally colonises inland road verges. 0-790 m (Caerns., Mid Perth and Co. Mayo).
The distribution of P. maritima in semi-natural habitats shows little change since the 1962 Atlas. It has spread on the verges of salt-treated roads, especially in Scotland, but this is barely evident at the 10-km scale.
Eurosiberian Wide-boreal element; also in N. America.