Stars in clusters are thought to form in a single burst from a common progenitor cloud of molecular gas. However, massive, old 'globular' clusters - those with ages greater than ten billion years and masses several hundred thousand times that of the Sun - often harbour multiple stellar populations, indicating that more than one star-forming event occurred during their lifetimes. Colliding stellar winds from late-stage, asymptotic-giant-branch stars are often suggested to be triggers of second-generation star formation. For this to occur, the initial cluster masses need to be greater than a few million solar masses. Here we report observations of three massive relatively young star clusters (1-2 billion years old) in the Magellanic Clouds that show clear evidence of burst-like star formation that occurred a few hundred million years after their initial formation era. We show that such clusters could have accreted sufficient gas to form new stars if they had orbited in their host galaxies' gaseous disks throughout the period between their initial formation and the more recent bursts of star formation. This process may eventually give rise to the ubiquitous multiple stellar populations in globular clusters.