The earliest land plants evolved from aquatic plants around  (Ma) in the Ordovician period. Many plants have adapted to an iodine-deficient terrestrial environment by removing iodine from their metabolism; in fact, iodine is essential only for animal cells. An important antiparasitic action is caused by the blockage in the transport of iodide of animal cells, inhibiting sodium-iodide symporter (NIS). Many plant pesticides are glycosides (such as cardiac digitoxin) and cyanogenic glycosides that liberate cyanide, which, by blocking cytochrome c oxidase and NIS, is poisonous only for a large part of parasites and herbivores and not for the plant cells, in which it seems useful in the seed dormancy phase. Iodide is not a pesticide but is oxidized, by vegetable peroxidase to iodine, which is a strong oxidant able to kill bacteria, fungi, and protozoa.
The Cretaceous period saw the appearance of more plant defense mechanisms. The diversification of flowering plants (angiosperms) at that time is associated with the sudden burst of speciation in insects. This diversification of insects represented a major selective force in plant evolution and led to the selection of plants that had defensive adaptations. Early insect herbivores were mandibulate and bit or chewed vegetation, but the evolution of vascular plants lead to the co-evolution of other forms of herbivory, such as sap-sucking, leaf mining, gall forming and nectar-feeding.
The relative abundance of different species of plants in ecological communities including forests and grasslands may be determined in part by the level of defensive compounds in the different species. Since the cost of replacing damaged leaves is higher in conditions where resources are scarce, it may also be that plants growing in areas where water and nutrients are scarce may invest more resources into anti-herbivore defenses, resulting in slower plant growth.