The invention relates to the use of viral vectors able to stably integrate into the genome of thymic stromal cells, or of intrathymic lymphocytes or lymphocytes precursors, for the manufacture of a medicine intended for intrathymic administration in the frame of the prevention or treatment of genetic immunodeficiencies, acquired immunodeficiencies, or for the induction of immune tolerance of the organism to self or non-self gene products, cells or tissues, or for the prevention or treatment of autoimmune diseases.