An amateur astronomer discovered a potentially dangerous asteroid heading towards Earth a few days before it flew in front of us.

The body would have caused global devastation if it collided with the ground. But it flew at a safe distance, at 40 million kilometers or more than 100 times the distance between Earth and the moon.

However, experts note that it is a reminder that relatively large objects can easily be missed as they approach Earth, and repeated warnings that without tracking the planet extensively it may be at risk of unexpected collisions.

The body – officially known as Asteroid 2020 QU6 – was first spotted by Leonardo Amaral at the Campo dos Amares Observatory in Brazil, on August 27. It made its closest flight over Earth on September 10.

There are a host of advanced surveys out there that aim to discover things like this before you get even close. But experts said the finding was a reminder that these systems are not completely reliable, and there could be many other interesting – and possibly dangerous – things flying around waiting to be found.

“This finding reminds us that although we have found most of the large NEOs [Near-Earth Objects]”We haven’t found all of them,” Casey Dreer, chief advocate and senior advisor for space policy at The Planetary Society, said in a statement.

NASA is mandated by the US Congress to find and track 90 percent of NEOs 140 meters or greater in height by 2020. But it struggled to do so amid calls for more funding: it found only 40 percent of those things. It is not expected to reach its target for another 30 years.

The Planetary Society notes that most major asteroid hunting projects take place in the Northern Hemisphere, which means the world is more at risk of losing those closer to the south of the equator. As such, projects like that of Mr. Amaral are key to discovering asteroids that might not have been missed otherwise.

This object is the latest asteroid to fly across Earth after it was observed relatively late at its approach. One expert said discoveries like these are cause for concern because they indicate that dangerous asteroids can arrive undetected – but the discovery should be a cause for hope, not anxiety.

“In the news, we’re hearing more and more about asteroid discoveries primarily because we’re getting better at finding and tracking near-Earth asteroids,” said the chief scientist at the Planetary Society, Bruce Bates, in a statement. “Suddenly there are no more asteroids, we’re just getting better at seeing them.”