A massive asteroid which has a non-trivial chance of striking Earth in 2036 has been filmed in a near-miss with our planet.

Apophis, named after an ancient God of destruction, would hit the Earth with the force of 500 megatons were our orbits to collide.

The 300 metre-wide rock flew past the Earth at about 14 million kilometres at midnight on Thursday, well beyond the orbit of the Moon.

But it has previously been a cause for concern for scientists, after a 2004 report claimed it had a 1 in 45 chance of eventually hitting Earth.

That was revised after further study, but it is still thought there is a one-in-200,000 chance that it could hit us in 2036.

That might not sound like much - but in space it's pretty short odds.

And even before that in 2029 it will come uncomfortably close, passing Earth at less than 30,000 km, nearer than many satellites.

Researchers will use Thursday's pass to study the asteroid's orbit, and to try and work out how its path could be affected by the heat of the Sun - something which is not well understood.

Scientists are currently tracking 9,000 near-Earth asteroids, and they find on average another 800 per year. There is a good chance that were an asteroid to hit us, we wouldn't know about it until too late.