JUNEAU, Alaska (AP) — People in Alaska’s capital have lived for more than a decade with periodic glacial dam outbursts like the one that destroyed at least two homes over the weekend.

But the most recent flood was surprising for how quickly the water moved as the surging Mendenhall River devoured riverbanks, undermining and damaging homes, and prompted some residents to flee.

Here are some issues surrounding glaciers and the floods that result from the bursting of snow-and-ice dams.

WHAT CAUSED THE FLOODING IN JUNEAU?

The water came from a side basin of the spectacular but receding Mendenhall Glacier that is known as the Suicide Basin. The glacier acts as a dam for precipitation and melt from the nearby Suicide Glacier that collects in the basin during the spring and summer. Eventually the water gushes out from under the Mendenhall Glacier and into Mendenhall Lake, from which it flows down the Mendenhall River.

Such glacial dam outbursts have been occurring in the area since 2011, but often the water releases more slowly, typically over a few days, said Eran Hood, a University of Alaska Southeast professor of environmental science.

Lake and streamflow levels reached record highs during Saturday’s flooding in Juneau, which is home to about 30,000 people and has numerous homes and popular hiking trails near the meandering Mendenhall River.

IS CLIMATE CHANGE TO BLAME?

Climate change is melting glaciers. A study released this year suggested significant melting by the end of this century amid current climate change trends, and a separate report indicated that glaciers in parts of the Himalayas are melting at unprecedented rates.

But the relationship between the changing climate and glacial outburst floods like the one in Juneau is complicated, scientists say.

The basin where the rain and meltwater collect was formerly covered by Suicide Glacier, which used to contribute ice to the Mendenhall Glacier. Smaller glaciers, like Suicide Glacier, respond more rapidly to changes in climate and the retreat of Suicide Glacier exposed the basin, Hood said.

But the floods that occur “really have nothing to do with climate change and glacier melt directly,” he said.

“The phenomenon itself is caused by climate, but the individual floods don’t have anything to do with climate because they’re basically just the case where water is filling up a basin and then draining at some point during the summer,” he said.

HOW UNUSUAL ARE THESE FLOODS?

These events aren’t new and happen in places around the world, threatening about 15 million people globally, according to researchers. There’s an Icelandic term for them, jökuhlaups.

But they’re not something many in the U.S. think about — even in Alaska, which is home to the bulk of U.S. glaciers, many of them remote.

One challenge with glacial dam outbursts is that the severity and timing can vary from year to year, researchers said.

Celeste Labedz, an environmental seismologist at the University of Calgary, said glaciers are dynamic. For example, as the long-retreating Mendenhall Glacier continues to melt, a process aided by the warming climate, it’s possible it will someday no longer block the basin and flooding from that basin will no longer be a concern. But there’s also potential for new basins to form, she said.

“As a glacier is thinning and retreating and changing, you can see some floods are going to stop happening and new ones are going to start happening. It’s a variable system,” Labedz said.

WHAT HAPPENS AS GLACIERS MELT?

In addition to flooding risks, glacial loss can mean diminished water supplies in parts of the world and could affect such things as agriculture and tourism.

Alaska is a bucket-list destination for visitors drawn by wild landscapes such as mountains and craggy glaciers that spectacularly calve into lakes or the ocean.

Glaciers cover about 33,000 square miles (85,000 square kilometers) of the state, and annual ice loss from glaciers in Alaska would be enough to cover Texas in 4 inches (10 centimeters) of water, said Christian Zimmerman, director of the U.S. Geological Survey’s Alaska Science Center.

Retreat of glaciers can also affect ecosystems, including salmon habitat, something researchers are hoping to better understand.