A dog almost caused a terrible crash during the Tour de France on Sunday. Thankfully for the bicyclists and the dog, it got out of the way just as the main group of cyclists was approaching.

According to the Daily Mail, the main field of racers had still been moving at 50 miles per hour as the 96-mile stage in Corsica was almost over. The bikes were approaching when suddenly a small dog came onto the track. In video of the incident, the owner can be seen walking all the way into the middle of the street and still wasn’t able to bring the dog in.

With less than seconds to spare, the owner ran all the way back to his side of the street, while the dog scampered off to the opposite side. The field passed through and there were no injuries.

CBS Sports reports that this has happened before, but there wasn’t always a happy ending. In 2007, German cyclist Marcus Burghardt rode right into a dog that was slowly walking across the track. Cows once tried to run in the race, also causing a crash.

Belgian Jan Bakelants did win Sunday’s race by just a second.

You can watch Sunday’s incident below:

image: YouTube screenshot