Two men kayaking in Alaska managed to capture on video the moment a glacier suddenly collapsed, sending a huge wave of water into the air.

Andrew Hooper and his friend were kayaking off the Kenai Peninsula to get a glimpse at the Spencer Glacier earlier this month when they captured a torrent of celestial-blue ice crashing down, creating a wave that inundated the two men.

Hooper said Monday they were not only fortunate to witness the beauty and power of nature, but also escape any injuries.

"It was absolutely gorgeous watching the raw power of the glacier as it fell in," he said Monday. "It was a beautiful event that we were lucky to have survived."

Watch the moment of the collapse:

Two men kayaking off Alaska captured the dramatic moment as part of a glacier came crashing down. 0:26

The collapse came during a stretch of unusually warm weather in the state and just days after July became Alaska's warmest month on record, according to the National Oceanic and Atmospheric Administration.

After paddling around for a while, Hooper said he heard a cracking noise near the glacier. They turned on their GoPro cameras and began filming.

"When it fell, it was cracking small pieces here and there then a big chunk came, another big chunk, and then it just collapsed in on itself," he said.

A wave of ice and water sprayed over them. At one point, Hooper said, he let go of his camera to shield himself from the ice.

"We were way too close," he said.

Alaska's average temperature in July was 14.5 C, 3 degrees above average, NOAA said. It beat the previous warmest month of July 2004 by 0.4 C.

Spencer Glacier is about 97 kilometres southeast of Anchorage, which on July 4 hit 32 C for the first time ever.

Hooper didn't want to comment on global warming, saying "that's not my area of expertise," but noted that while travelling around Alaska for the summer, locals have told him and his family it's been a lot warmer than usual.