Dog's miraculous escape at rally event

Sometimes it's just your lucky day and this dog looked destined for an untimely end after wandering onto the track of a rally in Bolivia, then something amazing happened.