An asteroid, named 2011 MD, barely missed crashing on to the Earth's surface today, but the real danger awaits us in 2182 when a gigantic asteroid may be on a collision course with this planet, astronomers warn.

2011 MD passed through Earth's orbit today, posing no real threat. The space rock was at least 7,500 miles away at its closest distance to the Earth - closer than the distance between the Earth and GPS satellites and 30 times closer than the distance between the Earth and the moon.

However, the real dangerous threat, according to scientists, will come in 2182 when a much bigger asteroid, which is 560 meters across, will come near the Earth with one-in-a-thousand chance of an impact.

The asteroid, discovered in 1999 and named 1999 RQ36, has been labeled as a potentially hazardous asteroid.

The total impact probability of asteroid 1999 RQ36 can be estimated at 0.00092 – approximately one-in-a-thousand chance – but what is most surprising is that over half of this chance (0.00054) corresponds to 2182, said Maria Eugenia Sansaturio of Valladolid University in Spain.

NASA will be sending a $800 million probe, called Osiris-Rex, to the asteroid to collect samples and return back to Earth. From the collected data, scientists will study the effects of sunlight on the asteroid's orbit and find the way to deflect the cosmic missile. The Yarkovsky effect, caused by sunlight on asteroids, will introduce disturbance, creating orbital uncertainty.

The unmanned probe is scheduled to launch in 2016, reach the asteroid in 2020, and return back to Earth by 2023, leaving the scientists enough time to devise a plan.

Other asteroids that will come close to Earth before 2182 include 2005 YU55 (November 2028) and Apophis (April 2029 and again in 2036), but neither of them have a high possibility of actually colliding with the Earth.