Asteroid 1999 KW4 is known as a ‘binary object’ because it is made up of two asteroids that are gravitationally bound together, Daily Mirror reported.
The larger asteroid is just under a mile wide, and its companion asteroid, or ‘moon’, is about a third of that size.
Although the asteroid system was classified as ‘potentially hazardous’, it soared safely past the Earth at a distance of 3,216,271 miles — or 13.5 times the distance to the Moon.
The image was captured by the European Southern Observatory's Very Large Telescope (VLT), located in the Atacama Desert of northern Chile.
The VLT is equipped with SPHERE — one of the very few instruments in the world capable of obtaining images sharp enough to distinguish the two components of the asteroid, which are separated by around 2.6 km.
Even so, the speed at which the asteroid was moving made observing it with the telescope exceptionally challenging, according to astronomers.
“During the observations the atmospheric conditions were a bit unstable," said Mathias Jones, a VLT astronomer involved in the observations.
"In addition, the asteroid was relatively faint and moving very fast in the sky, making these observations particularly challenging, and causing the AO (adaptive optics) system to crash several times.
"It was great to see our hard work pay off despite the difficulties!"
The image could provide useful data to help scientists figure out how to deflect potentially hazardous asteroids in the future, according to the scientists.
"In the worst possible case, this knowledge is also essential to predict how an asteroid could interact with the atmosphere and Earth's surface, allowing us to mitigate damage in the event of a collision," said ESO astronomer Olivier Hainaut.
Asteroid 1999 KW4 also bears similarities to another double-asteroid system, Didymos, the target of NASA's planned Double Asteroid Redirection Test (DART).
The mission will crash a spacecraft into Didymos' own moon — nicknamed "Didymoon" — in an attempt to change its trajectory.
The mission aims to demonstrate NASA's capability to deflect any space rocks that are found to be on a collision course with Earth.