Mysterious ultrabright and potent flashes of energy, more powerful than those emitted by the sun, have been spotted in the Milky Way for the first time.

Known as fast radio bursts (FRB), these high-intensity emissions usually last only for a fraction of a second.

FRBs were first detected in 2007 but they were too far away to clearly make out where they originated from.

But the researchers say their recently-discovered radio flares are the closest FRBs identified to date and come from an astronomical object known as a magnetar, about 30,000 light years from Earth.

Magnetars are a type of neutron star with a hugely powerful magnetic field - only a handful of them are thought to be present in the Milky Way.

Physicists have previously speculated that magnetars might produce FRBs but there was no evidence to prove that was the case.

Kiyoshi Masui, an assistant professor of physics at Massachusetts Institute of Technology in the United States, who led the team that analysed the brightness of the FRBs, said: "There's this great mystery as to what would produce these great outbursts of energy, which until now we've seen coming from halfway across the universe.

"This is the first time we've been able to tie one of these exotic fast radio bursts to a single astrophysical object."

The findings, published in three separate papers in the journal Nature, come from an international team of more than 50 researchers.

The astronomers used five telescopes to pick up signals from a magnetar at the centre of the galaxy, known as SGR 1935+2154.

These included two ground-based radio telescopes - the Canadian Hydrogen Intensity Mapping Experiment (CHIME) and the Survey for Transient Astronomical Radio Emission 2 (STARE2) - and three X-ray telescopes, including European Space Agency's INTEGRAL space telescope.

The researchers said they first observed X-ray bursts from the magnetar, which were then followed by brief but brilliant radio flares within several milliseconds of each other.

Based on the intensity of the FRB flashes, the astronomers were able to measure the brightness of the magnetar.

Christopher Bochenek, an astrophysicist at the California Institute of Technology in Pasadena, US, who is part of the team looking at data from the STARE2 telecsope, said: "In about one millisecond, this magnetar has emitted about as much energy in radio waves as the sun does in 30 seconds."

However, questions still remain as to how magnetars produce FRBs.

Prof Masui said: "We're trying to piece together what it all means.

"We've got our eyes open for other magnetars, but the big thing now is to study this one source and really drill down to see what it tells us about how FRBs are made."