Dead mussels and clams coated rocks in the Pacific Northwest, their shells gaping open as if they had been boiled. Sea stars were baked to death. Sockeye salmon swam sluggishly in an overheated Washington river, prompting wildlife officials to truck them to cooler areas.

The combination of extraordinary heat and drought that hit the Western United States and Canada over the past two weeks has killed hundreds of millions of marine animals and continues to threaten untold freshwater species, according to a preliminary estimate and interviews with scientists.

"It just feels like one of those postapocalyptic movies," said Christopher Harley, a marine biologist at the University of British Columbia who studies the effects of climate change on coastal marine ecosystems.

To calculate the death toll, Harley first looked at how many blue mussels live on a particular shoreline, how much of the area is good habitat for mussels and what fraction of the mussels he observed died. He estimated losses for the mussels alone in the hundreds of millions. Factoring in the other creatures that live in the mussel beds and on the shore — barnacles, hermit crabs and other crustaceans, various worms, tiny sea cucumbers — puts the deaths at easily over 1 billion, he said.

Harley continues to study the damage and plans to publish a series of papers.

Such extreme weather conditions will become more frequent and intense, scientists say, as climate change, driven by humans burning fossil fuels, wreaks havoc on animals and humans alike. Hundreds of people died last week when the heat wave parked over the Pacific Northwest. A study by an international team of climate researchers found it would have been virtually impossible for such extremes to occur without global warming.

Just before the heat wave, when Harley took in the eye-popping weather forecasts, he thought about how low the tide would be at midday, baking the exposed mussels, sea stars and barnacles. When he walked to the beach last week on one of the hottest days, the smell of decay struck him immediately.

"The more I walked and the more I saw, the more sobering it all became," Harley said. "It just went on and on and on."

The dead sea stars, or starfish, usually the most eye-catching creatures in tidal pools, hit him particularly hard. But the obvious mass victims were blue mussels, an ecologically important species that feeds sea stars and sea ducks and creates habitat for other animals.

Scientists have only begun to consider the domino effects. One concern is whether the sea ducks, which feast on mussels in the winter before migrating to their summer breeding grounds in the Arctic, will have enough food to survive the journey.

While the heat wave over the Pacific Northwest has eased, punishing temperatures have persisted across much of the American West. Now another heat wave appears to be building.

That means biologists are watching river temperatures with alarm. Salmon make an extraordinary migration, often hundreds of miles, from the inland rivers and lakes where they are born, out to sea, and then back again to spawn the next generation.

"We are already at critical temperatures three weeks before the most serious heating occurs," said Don Chapman, a retired fisheries biologist who specializes in salmon and steelhead trout, talking about conditions along the Snake River in Washington. "I think we're headed for disaster."