MADRID (AP) — Madrid's streets were baa-dly jammed Sunday, not by protesters or soccer fans but by a flock of sheep and goats being led through the Spanish capital in an annual festival that honors the area's rural heritage.

The ovine parade of bells, bleats, baas and horn music turned heads and drew crowds of thousands. Every year, organizers of the Transhumance Festival recreate the pastoral practice of moving livestock to new grazing grounds.

The festival also spotlights the environmental benefits of traditional grazing, in which livestock are used to clear brush and other flammable undergrowth, reducing the spread of wildfires.

The movement between seasonal pastures is called transhumance.

Juan García Vicente, an environmentalist who has taken part in the festival for three decades, said the summer's extreme wildfire season in Spain — among the most destructive in its recorded history — reinforced the event's ecological message.

“We have to fight this along several fronts," Vicente said of climate change, also warning of the “total abandonment of the rural world" in Spain.

Others in attendance were simply amused by their close proximity to the sheep and goats trotting next to Madrid’s famous landmarks. This year, some 1,100 Merino sheep and 200 goats took to the streets, organizers said.

“It's a very interesting concept,” said Jennifer Granda, an American tourist from Missouri who was in Madrid for two weeks to visit her daughter. “We appreciated the idea that they're promoting agriculture.”

The Spanish capital sits on an ancient migration route that has always been part of a vast grid of farming paths that cover the Iberian Peninsula. Where the city stands were once open fields and woodlands, crisscrossed by droving routes.

As part of the festival, organizers pay a symbolic fee for the animals' safe passage. The payment in medieval coins — 50 maravedis, presented at Madrid’s city hall — dates back to an agreement between the city and shepherds from 1418.

Madrid has held the festival since 1994. Towns and smaller cities in Italy, France and California hold similar events.

Last year, the event was canceled in Madrid due to concerns about a bluetongue disease variant.

In Spain, modern farming methods have reduced the practice of transhumance to a small group of farmers that keep the tradition alive not just for its environmental benefits but also for its cultural value.

Locals take in the noisy spectacle year after year, too.

On Sunday, that included Ana Vásquez, who came with her husband to catch the end of the event in Madrid's congested Puerta del Sol square.

“It's another traditional festival,” she said, in reference to the many other ‘fiestas’ Spaniards celebrate. “It recalls another era, and, well, it's nice.”