The annual Las Luminarias festival takes place on the eve of St Anthony's Day in San Bartolomé de Pinares, a village near Madrid, Spain. St Anthony is the patron saint of animals and the ritual of riding the horses through bonfires is believed to purify them and protect them for the year to come.

Source