Microglia are crucial for immune responses in the brain. Although their origin from the yolk sac has been recognized for some time, their precise precursors and the transcription program that is used are not known. We found that mouse microglia were derived from primitive c-kit(+) erythromyeloid precursors that were detected in the yolk sac as early as 8 d post conception. These precursors developed into CD45(+) c-kit(lo) CX(3)CR1(-) immature (A1) cells and matured into CD45(+) c-kit(-) CX(3)CR1(+) (A2) cells, as evidenced by the downregulation of CD31 and concomitant upregulation of F4/80 and macrophage colony stimulating factor receptor (MCSF-R). Proliferating A2 cells became microglia and invaded the developing brain using specific matrix metalloproteinases. Notably, microgliogenesis was not only dependent on the transcription factor Pu.1 (also known as Sfpi), but also required Irf8, which was vital for the development of the A2 population, whereas Myb, Id2, Batf3 and Klf4 were not required. Our data provide cellular and molecular insights into the origin and development of microglia.