The target vehicle is seen being pursued by the bomb, which changes direction at the last minute

In the video, which has been classified until now, the Paveway IV bomb - marked by the small moving black dot - is seen being laser-guided from the moment of release.

The Harrier jump jet pilot had tracked the Taliban commander in his vehicle and released the Paveway.

But while the smart bomb was racing to its target, the commander can be clearly seen pulling up outside a compound alongside civilians who would have been blown up with him.

So the pilot redirected it into a remote area of desert where it exploded safely. None of the civilians or the property were harmed.

But the RAF kept up the hunt - and two days later got their man.

The RAF says it has so far avoided any civilian casualties in Afghanistan since operations began in 2001.