An extraordinary flash spied in a faraway galaxy did come from a massive black hole that devoured a star after it wandered too close, scientists say.

The awesome energy released by the feeding frenzy was first detected by NASA's Swift satellite on March 28 and was later confirmed by a fleet of space and ground telescopes.

Some scientists initially thought the bright flash was a gamma-ray burst from a star collapsing, but flaring from such an event typically lasts only a few hours.

Instead of fading, the cosmic outburst continued to burn bright and emit high-energy radiation that could be observed even today.

sm-swift-blast-220-nasa

X-rays emitted by the explosion glow orange in this image from the Swift Observatory. ((Stefan Immler/Swift/NASA))

Two separate teams pored through data and concluded that an unsuspecting star the size of our sun likely got sucked in by the powerful tug of a giant black hole — a huge quantity of matter packed into a very small area that produces a gravitational field so strong that nothing, not even light, can escape.

Until the encounter, the black hole had been relatively inactive.

The researchers first proposed  the scenario in a NASA news release at the beginning of April. After further analysis, the findings were published online Thursday in the journal Science.

As the black hole gobbled up the star, it streamed a beam of energy straight at Earth that was recorded by telescopes. The stellar feast occurred in the heart of a galaxy 3.8 billion light years from Earth. A light year is about 6 trillion miles.

"This was clearly different than anything we've ever seen before," said one of the team leaders, Joshua Bloom, an astronomer at the University of California, Berkeley who classified the event as extremely rare.

Scientists think the latest observation could help them better understand how galaxies form.

Could what happened in the distant galaxy occur in our Milky Way? In theory yes, say scientists, but the chances are low.

"It's not something worth losing sleep over," said researcher Andrew Levan of University of Warwick in England, who led the other team.