Little is known about the regulation of cell fate decisions that lead to the formation of five pairs of mammary placodes in the surface ectoderm of the mouse embryo. We have previously shown that fibroblast growth factor 10 (FGF10) is required for the formation of mammary placodes 1, 2, 3 and 5. Here, we have found that Fgf10 is expressed only in the somites underlying placodes 2 and 3, in gradients across and within these somites. To test whether somitic FGF10 is required for the formation of these two placodes, we analyzed a number of mutants with different perturbations of somitic Fgf10 gradients for the presence of WNT signals and ectodermal multilayering, markers for mammary line and placode formation. The mammary line is displaced dorsally, and formation of placode 3 is impaired in Pax3ILZ/ILZ mutants, which do not form ventral somitic buds. Mammary line formation is impaired and placode 3 is absent in Gli3Xt-J/Xt-J and hypomorphic Fgf10 mutants, in which the somitic Fgf10 gradient is shortened dorsally and less overall Fgf10 is expressed, respectively. Recombinant FGF10 rescued mammogenesis in Fgf10(-/-) and Gli3Xt-J/Xt-J flanks. We correlate increasing levels of somitic FGF10 with progressive maturation of the surface ectoderm, and show that full expression of somitic Fgf10, co-regulated by GLI3, is required for the anteroposterior pattern in which the flank ectoderm acquires a mammary epithelial identity. We propose that the intra-somitic Fgf10 gradient, together with ventral elongation of the somites, determines the correct dorsoventral position of mammary epithelium along the flank.