Astronomers observing the nearest major spiral galaxy to the Milky Way have captured an astonishing “cosmic photobomb” of two supermassive black holes situated almost side-by-side.

Studying star data obtained from NASA’s Chandra X-ray Observatory and California’s Palomar Transient Factory, researchers from the University of Washington noted an optical anomaly. Now, what was once thought to be a pair of orbiting stars in the spiral Andromeda Galaxy – also known as M31 – is being reclassified as twin black holes.

Dubbed J0045+41, it’s thought to be the closest pairing of black holes ever documented. In another revelation, scientists believe the pair of energy vacuums are actually located outside the Milky Way’s neighbor, approximately 2.6 million light years from Earth.

“This is the first time such strong evidence has been found for a pair of orbiting giant black holes,” said Emily Levesque, of the University of Washington.

The recent study is detailed in the Astrophysical Journal. Astronomers had originally been looking for stars before the intriguing ‘photobomb’ took place.

READ MORE: Giant 5km-wide asteroid to make closest approach to Earth in 40 years – just week before Christmas

“We were looking for a special type of star in M31 and thought we had found one. We were surprised and excited to find something far stranger,” said study lead Trevor Dorn Wallenstein.

The team estimates the two supermassive black holes will eventually combine. But that could take anywhere between 350 and 360,000 years.