The Erk mitogen-activated protein kinase plays diverse roles in animal development. Its widespread reuse raises a conundrum: when a single kinase like Erk is activated, how does a developing cell know which fate to adopt? We combine optogenetic control with genetic perturbations to dissect Erk-dependent fates in the early Drosophila embryo. We find that Erk activity is sufficient to “posteriorize” 88% of the embryo, inducing gut endoderm-like gene expression and morphogenetic movements in all cells within this region. Gut endoderm fate adoption requires at least 1 h of signaling, whereas a 30-min Erk pulse specifies a distinct ectodermal cell type, intermediate neuroblasts. We find that the endoderm-ectoderm cell fate switch is controlled by the cumulative load of Erk activity, not the duration of a single pulse. The fly embryo thus harbors a classic example of dynamic control, where the temporal profile of Erk signaling selects between distinct physiological outcomes.