Flagellin

Flagellin is a globular protein that arranges itself in a hollow cylinder to form the filament in a bacterial flagellum. It has a mass of about 30,000 to 60,000 daltons. Flagellin is the principal component of bacterial flagellum, and is present in large amounts on nearly all flagellated bacteria. 
Structure.
The structure of flagellin is responsible for the helical shape of the flagellar filament, which is important for its proper function. It is transported through the center of the filament to the tip where it polymerases spontaneously into a part of the filament. It is unfolded by the FliS () flagellar secretion chaperone during transport. The filament is made up of eleven smaller "protofilaments", nine of which contains flagellin in the L-type shape and the other two in the R-type shape.
The helical N- and C-termini of flagellin form the inner core of the flagellin protein, and is responsible for flagellin's ability to polymerize into a filament. The middle residues make up the outer surface of the flagellar filament. While the termini of the protein are quite similar among all bacterial flagellins, the middle portion is wildly variable and can be absent in some species. The flagellin domains are numbered from the helical core (D0/D1) to the outside (D2, ...); when viewed from the amino-acid sequence, D0/D1 appears on the two termini. Flagellin-like structural proteins are found in other portions of the flagellum, such as the hook (flgE; ), the rod at the base, and the cap at the top.
The middle part of  "E. coli" (and related) flagellin, D3, displays a beta-folium fold and appears to maintain flagellar stability.
Immune response.
In mammals.
Mammals often have acquired immune responses (T-cell and antibody responses) to flagellated bacterium, which occur frequently to flagellar antigens. Flagellin has also been shown to directly interact with TLR5 on T cells. Some bacteria are able to switch between multiple flagellin genes in order to evade this response.
The propensity of the immune response to flagellin may be explained by two facts:
In plants.
In addition, a 22-amino acid sequence (flg22) of the conserved N-terminal part of flagellin is known to activate plant defence mechanisms. Flagellin perception in "Arabidopsis thaliana" functions via the receptor-like-kinase FLS2 (FLAGELLIN SENSING 2). Upon flg22 detection, FLS2 quickly binds to BAK1 (BRI1-associated kinase 1) to initiate signalling by reciprocal transphosphorylation of their kinase domains. Mitogen-activated-protein-kinases (MAPK) acts as downstream signalling compounds, leading ultimately to PAMP-triggered immunity in which more than 900 genes are up-/down-regulated upon flg22 treatment.
Pre-stimulation with a synthetic flg22-peptide led to enhanced resistance against bacterial invaders.