A truck-sized asteroid that loomed out of the darkness a few days ago - with the Earth in its sights - has sailed harmlessly past us, space scientists said.

NASA described it as "one of the closest approaches to our planet ever recorded".

Asteroid 2023 BU past without incident and back out into the blackness of space.

The rock, which was spotted for the first time on Saturday by an amateur stargazer in Crimea, came closest to the southern tip of South America at 12.30am today, according to scientists who were tracking it.

At its nearest point, the asteroid was just 3,600km from Earth's surface - just a quarter of the height of many of the geostationary satellites that make our telephones and car navigation systems work.

Amateur astronomer Gennadiy Borisov, who had already spotted an interstellar comet in 2019, raised the alarm over the weekend, alerting fellow space-watchers to the previously unknown celestial body.

Scientists around the world raced to calculate where it was headed - and whether we needed to start making last-minute evacuation plans.

"Scout quickly ruled out 2023 BU as an impactor, but despite the very few observations, it was nonetheless able to predict that the asteroid would make an extraordinarily close approach with Earth," said NASA's Davide Farnocchia, who helped develop Scout.

If the analysis had been off, however, humanity would still probably have been alright, scientists say.

At between just 3.5m to 8.5m across, Asteroid 2023 BU is too small to cause significant damage, and would have largely burned up as it hurtled through the atmosphere.

The close call will leave a more lasting impact on the asteroid itself, NASA's number-crunchers said.

Earth's gravity will affect the object's orbit, lengthening the amount of time it takes for 2023 BU to go around the Sun, from 359 days to a more leisurely 425 days.