But it was previously thought that those explosions occurred within Milky Way.
Now scientists suspect each one of us is made, in part, from matter created when suns exploded in distant galaxies.
"Given how much of the matter out of which we are formed may have come from other galaxies, we could consider ourselves space travellers or extragalactic immigrants," said Dr Daniel Anglés-Alcázar, of Northwestern University's astrophysics centre, who led the study.
"It is likely that much of the Milky Way's matter was in other galaxies before it was kicked out by a powerful wind, travelled across intergalactic space and eventually found its new home in the Milky Way."
Scientists recreated 3D computer models of galaxies, following their formation from just after the Big Bang to the present day.
Supernovae explosions cause atoms to be transported from one galaxy to another via galactic winds.
Galaxies are so far apart from each other that the process takes several billion years. The team found that the transfer of mass through galactic winds could account for up to 50 per cent of matter in the larger galaxies.
The research was published in the Monthly Notices of the Royal Astronomical Society.