Evolution of flagella

# Overview
The evolution of flagella is of great interest to biologists because the three known varieties of flagella (eukaryotic, bacterial, and archaebacterial) each represent an extremely sophisticated cellular structure that requires the interaction of many different and finely-tuned systems to function correctly.

# The eukaryotic flagellum
There are two competing groups of models for the evolutionary origin of the eukaryotic flagellum (referred to as cilium below to distinguish it from its bacterial counterpart).

## Symbiotic/endosymbiotic/exogenous models
These models argue some version of the idea that the cilium evolved from a symbiotic spirochete that attached to a primitive eukaryote or archaebacterium (archaea). The modern version of the hypothesis was first proposed by Lynn Margulis (as Sagan (1967): Margulis was the first wife of the late Carl Sagan).  The hypothesis, though very well publicized, was never widely accepted by the experts, in contrast to Margulis' arguments for the symbiotic origin of mitochondria and chloroplasts.
The primary point in favor of the symbiotic hypothesis is that there are eukaryotes that use symbiotic spirochetes as their motility organelles (some parabasalids inside termite guts, such as Mixotricha and Trichonympha).  While this is an example of co-option and the flexibility of biological systems, none of the proposed homologies that have been reported between cilia and spirochetes have stood up to further scrutiny.  The homology of tubulin to the bacterial replication/cytoskeletal protein FtsZ is a major argument against Margulis, as FtsZ is apparently found native in archaea,  providing an endogenous ancestor to tubulin (as opposed to Margulis' hypothesis, that an archaea acquired tubulin from a symbiotic spirochete).
At present the symbiotic hypothesis for the origin of cilia seems to be limited to Margulis and a few of her associates.  Margulis is, though, still strongly promoting and publishing a revised version of her hypothesis (Margulis' 1998 book Symbiotic planet: a new look at evolution has some frank autobiographical comments about her support of the symbiotic hypothesis for the origin of the cilium).

## Endogenous/autogenous/direct filiation models
Contrasting with the symbiotic models, these models argue that cilia developed from pre-existing components of the eukaryotic cytoskeleton (which has tubulin, dynein, and nexinalso used for other functions) as an extension of the mitotic spindle apparatus.  The connection can still be seen, first in the various early-branching single-celled eukaryotes that have a microtubule basal body, where microtubules on one end form a spindle-like cone around the nucleus, while microtubules on the other end point away from the cell and form the cilium.  A further connection is that the centriole, involved in the formation of the mitotic spindle in many (but not all) eukaryotes, is homologous to the cilium, and in many cases is the basal body from which the cilium grows.
An apparent intermediate stage between spindle and cilium would be a non-swimming appendage made of microtubules with a selectable function like increasing surface area, helping the protozoan to remain suspended in water, increasing the chances of bumping into bacteria to eat, or serving as a stalk attaching the cell to a solid substrate.
Regarding the origin of the individual protein components, an interesting paper on the evolution of dyneins shows that the more complex protein family of ciliary dynein has an apparent ancestor in a simpler cytoplasmic dynein (which itself has evolved from the AAA protein family that occurs widely in all archea, bacteria and eukaryotes). Long-standing suspicions that tubulin was homologous to FtsZ (based on very weak sequence similarity and some behavioral similarities) were confirmed in 1998 by the independent resolution of the 3-dimensional structures of the two proteins.

# The bacterial flagellum
An approach to the evolutionary origin of the bacterial flagellum is suggested by the fact that a subset of flagellar components can function as a Type III transport system.
Admittedly, all currently known nonflagellar Type III transport systems are for injecting toxin into eukaryotic cells, and are therefore presumably descended from the flagellum, which is likely older than eukaryotes. For example, the bubonic plague bacterium Yersinia pestis has an organelle assembly very similar to a complex flagellum except that it functions as a needle to inject toxins into host cells.
However, the Type III transport system still undergirds the hypothesis that the flagellum did not have to come about all at once, as a subset of components has a selectable function. That all known nonflagellar Type III transport systems are disease mechanisms is not shocking, because the Type III secretion system was only discovered in 1994 and scientific study of eubacteria is significantly biased towards disease-causing organisms.  This provides another case of co-option, where a motility organelle has evolved into a "complex weapon for close combat."

# The archaeal flagellum
The recently elucidated archaeal flagellum is analogous, not homologous, to the bacterial one. In addition to no sequence similarity being detected between the genes of the two systems, the archaeal flagellum appears to grow at the base rather than the tip, and is about 15 nanometers (nm) in diameter rather than 20. Sequence comparison indicates that the archaeal flagellum is homologous to Type IV pili (pili are filamentous structures outside the cell). Interestingly, some Type IV pili can retract. Pilus retraction provides the driving force for a different form of bacterial motility called "twitching" or "social gliding" which allows bacterial cells to crawl along a surface. Thus Type IV pili can, in different bacteria, promote either swimming or crawling. Type IV pili are assembled through the Type II transport system. So far, no species of bacteria is known to use its Type IV pili for both swimming and crawling.

# Further research
Testable outlines exist for the origin of each of the three motility systems, and avenues for further research are clear; for prokaryotes, these avenues include the study of secretion systems in free-living, nonvirulent prokaryotes. In eukaryotes, the mechanisms of both mitosis and cilial construction, including the key role of the centriole, need to be much better understood. A detailed survey of the various nonmotile appendages found in eukaryotes is also necessary. Finally, the study of the origin of all of these systems would benefit greatly from a resolution of the questions surrounding deep phylogenywhat are the most deeply branching organisms in each domain, and what are the interrelationships between the domains (see Last universal ancestor)?