During the Devonian, several plant groups independently evolved "heterospory" and later "endospory", in which single megaspores were kept inside the sporangia of the parent sporophyte. These endosporic megaspores had a miniature multicellular female gametophyte with female sex organs and egg cells. The ova were fertilised by free-swimming sperm produced by windborne miniatuarised male gametophytes in the form of pre-pollen.