An asteroid the size of a school bus flew remarkably near Earth on Thursday, providing scientists with an opportunity to test the warning systems that would kick in if a space collision was coming.

Asteroid 2012 TC4 came close -- passing Earth at a distance of only around 44,000km, which is nothing in Universe terms.

There was no actual risk of a hit, although the asteroid did come well inside the orbit of the Moon and that of some human-made satellites.

"Basically, we pretended that this is a 'critical' object with a high risk of impacting Earth ... and exercised our communication channels and used telescopes and radar systems for observations," Detlef Koschny of European Space Agency said in a blog post on the agency's website.

The results were mixed.

Koschny said one big radar system in Puerto Rico did not work due to damage from Hurricane Maria but that another U.S. based radar system was used instead.

"This is exactly why we do this exercise – to not be surprised by these things," he said.

Radar images showed the asteroid was about 10 to 12 metres (yards) wide, roughly the size of an asteroid that exploded over Chelyabinsk, Russia in 2013, leaving more than 1,000 people injured by flying glass and debris.

Koschny said the ESA now needed to update its predictions for how close 2012 TC4 will come to Earth on its next flyby, which has so far been forecast for 2079.