An erect annual of mildly acidic to calcareous soils. Inland it is found in dry, open grasslands and heaths, in woodland rides, marl pits and other open, disturbed ground. On the coast it is a plant of open sandy and muddy grassy places, often by estuaries, sand dunes and in upper saltmarsh. Lowland.
The overall distribution of this species has remained stable although there has been some decline on heathland due to lack of management (particularly grazing), and coastal development has led to the loss of some of its former sites. It is much better recorded than in the 1962 Atlas.
Eurosiberian Southern-temperate element.