Leaves are formed at the flanks of the shoot apical meristem (SAM) and develop into a variety of forms. In tomato, prolonged leaf patterning enables the elaboration of compound leaves by reiterative initiation of leaflets with lobed margins. In goblet (gob) lossof-function mutants, primary leaflets are often fused, secondary leaflets and marginal serrations are absent, and SAMs often terminate precociously. We show that GOB encodes a NAC-domain transcription factor expressed in narrow stripes at the leaf margins, flanking the distal side of future leaflet primordia, and at the boundaries between the SAM and leaf primordia. Leafspecific overexpression of the microRNA miR164, a negative regulator of GOB-like genes, also leads to loss of secondary-leaflet initiation and to smooth leaflet margins. Plants carrying a dominant gob allele with an intact ORF but disrupted miR164 binding site produce more cotyledons and floral organs, have split SAMs and, surprisingly, simpler leaves. Overexpression of a form of GOB with an altered miR164 binding site in leaf primordia leads to delayed leaflet maturation, frequent, improperly timed and spaced initiation events, and a simple mature leaflet form owing to secondary-leaflet fusion. miR164 also affects leaflet separation in Cardamine hirsuta, a Brassicaceae species with complex leaves. Genetic and molecular analyses suggest that GOB expression is intact in the simplified leaves of entire tomato mutants, which have a defect in a putative repressor of auxin responses. Our results show that GOB marks leaflet boundaries and that its accurate spatial, temporal and quantitative activity affects leaf elaboration in a context-dependent manner.