Morphogen and transcription factor gradients are known to pattern tissues during development, but how these gradients are established is unclear. Using mouse embryos, embryonic stem cells (ESCs) and mathematical modelling, Heiko Lickert and colleagues show that the microRNA miR-335 fine-tunes a transcription factor gradient in the endoderm (p. 514). The researchers identify miR-335 as a microRNA that is differentially regulated during mesendoderm differentiation. They further show that miR-335 is expressed and functions transiently in endoderm progenitors and later during mesoderm formation. Importantly, miR-335 targets mRNAs encoding the endoderm-determining transcription factors Foxa2 and Sox17; miR-335 overexpression blocks endoderm differentiation in ESCs and, conversely, inhibition of miR-335 activity leads to Foxa2 and Sox17 accumulation and increased endoderm formation. Finally, mathematical modelling incorporating both microRNA and protein turnover rates predicts that miR-335 can shape a gradient of Foxa2 and Sox17 in the endoderm, and this prediction is confirmed experimentally. Overall, these findings highlight that a microRNA can shape a transcription factor gradient in time and space.