By Jonathan Amos
BBC News science reporter, in Leicester
The collision of two superdense stars would produce the strongest magnetic fields in the Universe, scientists say.
These would be more than a thousand million-million times the strength of Earth's magnetic field, the UK-German team reports in Science magazine.
Its computer simulations fit with the theory that mergers of neutron stars drive some of the bursts of high-energy radiation that sweep across space.
However, the group says more work is needed to explain the link in detail.
Dr Daniel Price from the University of Exeter, UK, and Professor Stephan Rosswog from the International University Bremen, Germany, carried out their modelling on a supercomputer.
The simulations required many months of programming. (Follow the internet links for the team's simulation movies).
The study gives fresh insight into the mechanisms that could lie behind extremely powerful, split-second flashes of light called short gamma-ray bursts (GRBs).
The space-borne telescopes Swift and Hete-2 have indicated the source of at least some of these 100-millisecond bursts could result from two compact, magnetised objects falling on to each other.
Theory suggests these objects could be two neutron stars, the remnant cores of massive stars that have imploded after running out of nuclear fuel.
Although about the same mass as our Sun, neutron stars would be little more than 10km across.
Corpses of massive stars that have collapsed and exploded
Typical masses little more than our Sun; radii about 10 km
Superdense objects - more dense than atomic nuclei
Neutron star binaries are focus of intense scientific study
Now being observed for their gravitational waves
Colliding binaries thought to be source of short GRBs
Neutron star collisions with black holes also a possibility
GRBs signal the most violent events in the Universe
Such objects are expected to have intense magnetic fields anyway but the new simulations show that a collision between a pair of them could produce something altogether more spectacular - and sufficiently intense to launch a GRB.
Key to this link is the very rapid speed with which the giant magnetic fields are seen to develop in the modelled collisions.
This has to be so if neutron star mergers are to explain the short gamma-ray bursts.
"Our simulations are of the first 12 milliseconds but all the action goes on in the first couple of milliseconds the stars hit each other. You get this very strong shear that rotates and winds the magnetic field up," Dr Price told the BBC News website.
Professor Rosswog added: "This is an incredible result. Magnetic fields that we are familiar with, say from a magnet at your refrigerator, have a strength of about 100 Gauss. Such a collision produces fields that are an incredible 10-million-million times stronger."
GRBs have been one of the great unexplained phenomena in astronomy since they were first detected in the 1960s.
It is only in recent years, with the launch of new space telescopes, that scientists have had the tools capable of studying in detail these very bright, but fleeting, events.
Computer modelling of the type carried out by the UK-German team is essential companion work to the observations, as it helps to unravel the extreme physics involved.
"There were certain speculations about how you could grow the magnetic fields, but now we know they develop very quickly. This means we have a firm theoretical basis on which to push forward with this model of how binary neutron stars produce gamma-ray bursts," Dr Price said.
The results of the simulations are being presented this week at the UK Royal Astronomical Society's National Astronomy Meeting in Leicester, and at the Nuclear Astrophysics conference at Ringberg Castle, Tegernsee.