YELLOWSTONE NATIONAL PARK, Wyo. (AP) _ Firefighters battling wildfires contended with higher winds today and looked forward to an approaching Canadian cold front expected to bring showers and cooler temperatures to burning woodlands this weekend.

On Thursday, presidential candidate Michael Dukakis gave crews at fire- blackened Yellowstone National Park a pep talk and expressed awe at nature's devastation.

''I can't remember a year in my lifetime when the weather seemed to be more important to us in many ways,'' the 55-year-old Democrat said during his tour of the park.

''The drought, the heat, and now a massive hurricane bearing down on us are reminding us not only of our mortality but of the importance of pulling together and caring for each other,'' the Massachusetts governor said.

Blazes burned today in Wyoming, Montana, Idaho, Oregon and Washington state as the worst fire season in 30 years continued. More than 4 million acres, including 2.1 million acres in Alaska, have gone up in smoke.

The 8,400 soldiers and civilian firefighters in drought-parched Yellowstone got a break this week from cooler, calmer weather, but Park Superintendent Bob Barbee said, ''We're not out of the woods yet.''

Firefighters continued to beef up protection of areas that could be threatened if conditions worsened. Efforts Thursday focused on Lake Village, which could be threatened by a 335,000-acre fire, said fire information officer Bob Valen.

Winds kicked up today and were expected to hit 20 to 35 mph, but the forecast contained some good news: a Canadian cold front bearing cool, rainy weather was expected to reach Yellowstone by Sunday.

The wind will ''definitely make increased fire activity, but we don't anticipate any runs like we had last weekend,'' said park spokeswoman Linda Miller.

Dukakis toured Yellowstone with the Democratic governors of Wyoming, Montana, Colorado and Idaho.

''I know I speak for every single American citizen when I tell you we are grateful to you and I know you have been taking on what is a massive undertaking,'' Dukakis told firefighters, adding he was ''awestruck by what's happened here.''

The fires, which now form one huge blaze, have affected 1.1 million acres of the 2.2 million-acre park. But according to new infrared scans, they have burned only about 50 to 60 percent of the land within fire perimeters.

Dukakis refused to be drawn into the debate over whether the Reagan administration should have acted sooner. Following National Park Service policy, the government allowed naturally ignited fires to burn until July.

The other governors agreed that the Park Service should have attacked the fires sooner because of this year's dry conditions, said Colorado Gov. Roy Romer.

Interior Secretary Donald Hodel has said the ''let-burn'' policy may be changed.

In west-central Montana today, a battalion of 540 soldiers from Washington state were on fire lines, relieving weary firefighters mopping up the smoldering 247,000-acre Canyon Creek fire.

''It looks real good. The forecast is for additional precipitation. In fact, it's showering here right now,'' fire information officer Jack Kendley said today.

In Glacier National Park near the Canadian border, winds and temperatures in the 80s kept nearly 1,000 firefighters busy. Officials expected the fire to continue spreading east today as shifting winds gust to 25 mph, said fire information officer Jim Payne.

''We've got a sleeping giant that's tied down pretty well, except he's trying to wiggle free on the northeast side,'' Payne said today. The fire grew by about 2,000 acres overnight to 34,500 acres.

The approaching Canadian cold front may bring rain to the area this weekend, or even snow at higher elevations, forecasters said. ''We're all hoping for snow tomorrow, every one of us,'' said spokeswoman Stephanie Gibert.

In Idaho, about 300,000 acres of forest fires continued to burn.

In Washington, officials said land in the eastern section of the state would be reopened to the public this weekend due to gains made against wildfires. A ban on hunting and fishing was to be lifted at midnight tonight, and statewide bans on logging were relaxed.

In Oregon, 14 more fire crews were ordered into the struggle against a blaze in Willamette National Forest, boosting the force to more than 1,600 firefighters and support crews. Hot, windy weather was predicted this weekend.

Infrared aerial photographs taken Thursday night put the fire at 7,232 acres, an increase of 882 acres over the previous night.

''The main objective is to hit the fire hard the next two to three days, before the east winds move in,'' Forest Service spokeswoman Lorette Laferriere said. ''We expect more dry weather and east winds along about Sunday or Monday.''