Thymic epithelial cells (TECs) are specialized cells with high degree of anatomic, phenotypic and functional heterogeneity that are located in the outer layer (epithelium) of the thymic stroma. The thymus, as a primary lymphoid organ, mediates T cell development and maturation. The thymic microenvironment is established by TEC network filled with thymocytes (blood cell precursors of T cells) in different developing stages. TECs and thymocytes are the most important components in the thymus, that are necessary for production of functionally competent T lymphocytes and self tolerance. Dysfunction of TECs causes several immunodeficiencies and autoimmune diseases.
 They are also called epithelial reticular cells, or epithelioreticular cells (ERC).
 The final anatomical location of the thymic gland is reached at 6 weeks in the fetus. TECs originate from non-hematopoietic cells that are characterized by negative expression of CD45 and positive expression of EpCAM. Then TECs are divided into two phenotypically and functionally different groups that have distinct location, cytokeratin expression, surface markers, maturation factors, proteases and function in a T cell selection. Cortical thymic epithelial cells (cTECs) are presented in the outer thymic cortex region, in comparison with medullary thymic epithelial cells (mTECs) located in the inner thymic medulla. Both cTEC and mTEC participate in imposing central and peripheral tolerance. cTECs play a key role in the positive selection and mTECs eliminate auto-reactive thymocytes during the negative selection. Both of these types of cells can be defined and reciprocally distinguished by their expression of cytokines, chemokines, costimulatory molecules, and transcription factors, which have an effect on thymocyte development.
TECs, situated in the corticomedullary junction, express two types of cytokeratin: K5 and K8. From these immature progenitors K5+K8+ TECs are derived mTECs with typical expression of K5, K14 and also cTECs, characterized by K8, K18 expression.
 Maturation of mTEC leads to expression of high levels of MHCII, CD80, autoimmune regulator Aire and tissue restricted antigens (TRAs). Expression of Cathepsin L and Cathepsin S is also typical for mTEC, because of participation of these proteases in the negative selection of T cells. Representative surface markers are UEA-1 and CD80. After maturation continue mTEC to the terminal differentiation stage, which is accompanied by loss of specific maturation factors (MHCII, Aire, CD80, TRA) and initiation of involucrin expression, marker of terminally differentiated epithelium. Remaining MHCIIhi CD80hi, Aire+ mTEC subset will die by apoptosis.
 Maturation of cTEC is also mediated by high expression of MHCII molecules but it is combined with proteases β5t, Cathepsin L and TSSP. These factors partake in positive selection of T cells. Specific markers on the surface of cTEC are Ly51 and CD 205 and even group of TECs expressing marker CD205 represent one of immature progenitors cells - cTEC committed progenitors. These cells are also called thymic epithelial progenitors cells (TEPCs) and they provide that cortical and medullary epithelial thymocytes share an origin in the postnatal thymus. cTEC-committed progenitor could generate both cTEC and mTEC, in comparison with mTEC-committed progenitor, which is able to produce just mTEC. mTEC-committed progenitors are described by expression of Clandin 3 and Clandin  4 that are not components of cTEC progeny.
 The first steps of TEC development are regulated by the transcription factors (Hoxa3, Pax1/9, Eya1, Six1/4, Tbx1), most of which are in postnatal cTEC and immature TECs. The most important transcription factor for all stages of TEC development in embryonic and postnatal thymus is a Foxn1. Foxn1 controls the whole process by the activation of its target genes with binding to specific DNA sequence via its forkhead box domain. There are highlighted over 400 Foxn1 targeted genes, included critical loci for TEC differentiation and function. TEC development require activity of other molecules and transcriptional regulators, such as protein 63 (p63) that is involved in homeostasis of various epithelial lineages, chromobox homolog 4 (Cbx4) which regulates cell proliferation and differentiation, fibroblast growth factors Fgf7 and Fgf10 that initiate TEC expansion, TNFT, CD40, lymfotoxin β receptor (LTβR)   and Hedgehog signaling pathway, which could reduce TEC cells in fetal and postnatal thymus.
These typical molecules for TEC progenitors development are mostly similar and shared with cTEC. The early stages of cTEC also require high expression of Pax 1/9,Six1/4,Hixa3 but they could be established in the absence of NFκB. In contrast, mTEC development is dependent on the presence of Relb, NFκB signals and the TNFR superfamily but it could be performed in the absence of Foxn1.
 Double negative (DN) T cells, as a progenitors with CD44 and CD25 expression but lack of CD4 and CD8 coreceptor expression, are proliferated and differentiated to the double positive (DP) stages. These CD4+ and CD8+ double positive T lymphocytes already express completely recombined  TCRs that are tested for recognizing self and non-self molecules by MHCI and MHCII presentation of self antigens on the cTEC. Thymocytes that make adequate interaction with MHC complex, are survived and diverted to either CD4+ or CD8+ single positive (SP) T lymphocytes. These single positive cells migrate out of the cortex to the medulla, where the process continues as a negative selection.
 Without negative selection thymocytes are unable to respond to TCR triggering by proliferation, because of a chance of presence auto-reactive T-cell clones. During the negative selection T-lymphocytes acquire competence for elimination of potentially self reactive cells by apoptosis. So if TCR exhibit high or inappropriate affinity for the self antigen expressed on mTEC, the thymocyte will be destroyed. mTEC expressed wide repertoire of self peptides presented on the MHC molecules. Medulla is also important for implementation of self tolerance, which is mediated by CD4+CD25+Foxp3 nTreg cells. Foxp3 Treg development is supported by mTECs during negative selection, when thymocytes have TCR specificities with intermediate affinity for self antigens.
 TECs, as a component of the thymus, play a key role in thymocyte development and self-tolerance, so their dysfunction causes many autoimmune diseases, tumors of immunodeficiencies. Most frequently are occurred epithelial tumors established from TEC and thymocytes - thymomas and thymic carcinoma. Maturation abnormalities of TECs induce chronic inflammatory diseases and decreased count of mTEC and cTEC leads to chronic inflammatory bowel disease (IBD). Autoimmune disease development is result of a break down of the self-tolerance by Aire-mediated TRAs' expression on mTEC or the negative regulatory system formed by CD4+CD25+Foxp3 nTreg cells. Aire mediates negative selection of auto-reactive T-cells and organ-specific antigens' expression on mTECs. The outcome of a single gene mutation in the autoimmune regulator Aire is systematic disease APECED (APS-1), which is manifested by mucocutaneous candidiasis, hypoparathyroidism and adrenal insufficiency. There are many autoimmune diseases, caused by failure of self-tolerance by TRAs on mTEC, for example autoimmune thyroiditis, rheumatoid arthritis or multiple sclerosis. Type 1 diabetes is a result of the absence of self-tolerance, which is characterized by a decreased expression of Insulin 1 and Insulin 2 (TRAs) on mTEC. mTEC and cTEC damage is observed during Graves' disease, Myasthenia gravis or HIV.
 List of distinct cell types in the adult human body