A recently discovered asteroid gave Earth a close shave yesterday as it came within the moon's orbit. The near-Earth asteroid 2012 XE54, which was only spotted for the first time on Sunday, came within 140,000 miles of our planet. The moon orbits at an average distance of 240,000 miles or so from the Earth. Astronomers estimate that 2012 XE54 is about 120ft wide - big enough to cause substantial damage if it ever hits us. An object of similar size flattened 800 square miles of forest in Siberia in 1908.

Close encounter: A 60-second exposure of XE54 streaking through the sky on Tuesday, during a flyby that brought it inside the moon's orbit

'Asteroids eclipsing during an Earth flyby are relatively rare,' astronomer Pasquale Tricarico of the Planetary Science Institute in Tucson, Arizona, wrote on a blog on Monday.

Luckily, there is thought to be no danger of it, or another recently discovered rock, hitting Earth - but scientists say the unique occurrence could help them learn a lot about asteroids.

'A close analysis of the trajectory of this asteroid reveals that it will likely cross the Earth's shadow, causing a partial eclipse of the asteroid a few hours before reaching its minimum distance with the Earth,' said Pasquale Tricarico of the Planetary Science Institute, who created the animation above.

Astronomers also created this unique view of the earth - from the asteroid as it passes close by.

This animation shows the Sun and the Earth as observed from the asteroid 2012 XE54, which passed close to Earth along with a long-studied giant space rock named Toutatis.

Asteroids eclipsing during an Earth flyby are relatively rare, with the first known case of asteroid 2008 TC3 which was totally eclipsed just one hour before entering Earth's atmosphere over Sudan in 2008, and asteroid 2012 KT42 experiencing both an eclipse and a transit during the same Earth flyby in 2012.

4179 Toutatis, with a shape that has been described as a 'malformed potato' will pass 6.9 million kilometers (4.3 million miles) away from Earth, or more than 18 times the distance from the Earth to the Moon.

At 4.46 kilometers (2.7 miles) long and 2.4 kilometers (1.5 miles) wide, astronomers say it is considered a potentially hazardous asteroid because it makes repeated passes by the Earth, about every four years.

In comparison, the asteroid that is thought to have destroyed the dinosaurs was approximately 10 km (6 miles) wide.

It's passing will be streamed online by the Slooh Space Camera

At its maximum brightness, experts say Toutatis might be barely visible through binoculars.