The closeness of the animals delighted the urban dwellers who gathered to watch the unfamiliar ritual. Children tried to touch the soft merino wool of the locally bred sheep.
Madrid has held the festival since 1994, and towns and smaller cities in Italy, France and California hold similar events.
In Spain, modern farming methods have reduced practicing transhumance - the seasonal movement of livestock - to a small group of farmers that keep the tradition alive through associations such as Concejo de la Mesta, who are responsible for the Transhumance Festival in Madrid.