Unaware that time is short, more than 200 brown-and-white goats slowly munch their way through the thick undergrowth that covers the hills of southern Portugal.

Squinting against the sun's glare, Daniel Fernandes, a goat herder, whistles and makes clicking noises to direct his animals across the ridges where they can fill their bellies on the dense vegetation.

Yet this is not just a pretty pastoral scene. These hungry goats are on the front lines of Portugal's fight against deadly summer wildfires.

The government is hiring this herd, and dozens of others nationwide, as part of its race against the clock to guard rugged parts of the Iberian nation against a repeat of last year's catastrophic wildfires. That includes trying to clean up as much woodland as possible before temperatures rise and the land becomes a tinderbox.

Blazes routinely blacken large areas of forest every year in Portugal. But last year they killed 106 people in what was by far the deadliest summer fire season on record. It was also a wake-up call for authorities, who were slow to react to social trends and a changing climate.

"Last year was when it became patently clear to us that something different had to be done," says Miguel João de Freitas, the government's junior minister for forests and rural development. "Prevention is the most urgent requirement, and it has to be done as soon as possible."

It's a mammoth task, and one that has at times been slowed by red tape. But one of the tactics being adopted is a proven winner: Deploying goats as an environmentally friendly way to prevent wildfires has been done for decades in the United States, especially California and the Pacific Northwest.

With Portugal's peak July 1 to Sept. 30 wildfire period just around the corner, the government is enacting a raft of preventive measures. They include using goats and bulldozers to clear woodland 33 feet either side of country roads. Property owners must clear a 164-foot radius around an isolated house, and 328 feet around a hamlet.

Emergency shelters and evacuation routes are being established in villages, and their church bells will now toll when a wildfire approaches.

The government is also upgrading firefighters' response capabilities, hiring 12 water-dumping planes and 41 helicopters. In the peak wildfire period, it promises that more than 10,700 firefighters will be on standby – 1,000 more than last year.

But even as Portugal rushes to get ready, experts warn it will likely take years to correct the trends that make the country especially vulnerable.

In recent decades, people have deserted the countryside in droves to pursue a better life in bigger towns and cities. That has left care of the forests in the hands of mostly elderly people who often lack financial resources.

Portuguese farmers often plant long, unbroken stretches of eucalyptus, a fast-growing tree that offers a quick financial return from the country's important paper pulp industry. But eucalyptus also burns like a fire torch. The government is introducing legislation to encourage the planting of more slow-growing native species, such as cork trees, holm oaks, or chestnut trees, which are more resilient to flames and can slow the advance of wildfires.

Climate change isn't helping. In the 1980s, Portugal saw its annual average of charred forest come in at less than 185,325 acres. Since 2000, that number has grown to more than 370,658 acres a year, with experts attributing the rise to hotter, drier summers.

The hamlet of Moita da Guerra, in the heart of the Serra do Caldeirao hill range, 150 miles south of the capital Lisbon, illustrates some of the challenges. It lies in a thinly populated area only a few miles from the famous beaches that make this Algarve region one of Europe's top vacation destinations.

"There used to be lots of herds around here," Mr. Fernandes, the goat herder, says, leaning on his thick walking stick. "Some people have died, some gave up, and young people aren't interested in this."

Fanned by the summer "Nortada" – north wind – the abundant, waist-high brush here fuels wildfires that race across the hills.

Fernandes and his wife Anita – the only two residents left in Moita da Guerra – vividly recall a major blaze in 2004 that almost engulfed them. In the end, the flames leapt over them between the treetops and kept going. Their goats were crucial to the family's survival, because they had eaten and trampled down the undergrowth that surrounded their home, starving the flames.

His latest herd is busy on a government-financed mission this year to carve out firebreaks in the Algarve before the hot days of summer arrive.

Still, a lot remains to be done to fend off the threat of wildfires in Portugal – a project that experts say will take years.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

"Unfortunately, there is no single, game-changing fix to the dilemma Portugal now finds itself in regarding the threat of catastrophic fire," a report published by fire experts in April commented. "Rather, the solution will demand dozens of strategic improvements made in the next several years and possibly over the next decade."

This story was reported by The Associated Press.