In biology, a spore is a unit of asexual reproduction that may be adapted for dispersal and for survival, often for extended periods of time, in unfavorable conditions. By contrast, gametes are units of sexual reproduction. Spores form part of the life cycles of many plants, algae, fungi and protozoa. Bacterial spores are not part of a sexual cycle but are resistant structures used for survival under unfavourable conditions. Myxozoan spores release amoebulae into their hosts for parasitic infection, but also reproduce within the hosts through the pairing of two nuclei within the plasmodium, which develops from the amoebula.”Myxozoa.” Tree of Life web project. Ivan Fiala 10 July 2008. Web. 14 Jan. 2014. Spores are usually haploid and unicellular and are produced by meiosis in the sporangium of a diploid sporophyte. Under favourable conditions the spore can develop into a new organism using mitotic division, producing a multicellular gametophyte, which eventually goes on to produce gametes. Two gametes fuse to form a zygote which develops into a new sporophyte. This cycle is known as alternation of generations. The spores of seed plants, however, are produced internally and the megaspores, formed within the ovules and the microspores are involved in the formation of more complex structures that form the dispersal units, the seeds and pollen grains.