A 32-year-old U.S. Army soldier climbed over the permanent railing of an active volcano in Hawaii to get a closer look, fell in, and survived, authorities said.

The man, who is based at the Pohakuloa Training Area on the Big Island, was visiting the Hawaii Volcanoes National Park on Wednesday when he fell from a 300-foot cliff at Kilauea caldera's edge after losing his footing, the National Park Service said in a statement.

Luckily, about two and a half hours later, he was found on a narrow ledge about 70 feet down from the cliff’s edge. Responders were able to rescue him through a “high angle extraction” using ropes. Authorities said the man, who was seriously injured, was airlifted to Hilo Medical Center in Hilo, Hawaii.

“Visitors should never cross safety barriers, especially around dangerous and destabilized cliff edges,” Chief Ranger John Broward said in a statement. “Crossing safety barriers and entering closed areas can result in serious injuries and death.”

Download the NBC News app for breaking news and politics

While Kilauea caldera is not currently erupting, according to the U.S. Geological Survey, it’s an active volcano that destroyed more than 700 homes on Hawaii’s Big Island in 2018.

Volcanoes National Park hasn’t seen a death since 2017, but it did close for more than four months last year after volcanic activity caused explosive eruptions, earthquakes and the collapse of the famed Halemaumau crater.