SEELEY LAKE, Mont. (AP) — Authorities rescued five snowmobilers early Monday after one of the riders fell through the ice into a remote Montana lake, forcing them to build a fire to stave off the freezing cold and snow while they waited for help, officials said.

The riders were on Dinah Lake in the Lolo National Forest near the Mission Mountains in western Montana. One machine went through the ice, forcing the rider to swim to shore, according to the sheriff’s office. Other riders got wet trying to pull the snowmobile out of the water.

Nobody needed medical attention, though it took members of the Seeley-Swan Search and Rescue Team about nine hours to reach the stranded snowmobilers in the overnight snowstorm, according to Missoula County Sheriff’s officials.

Sheriff’s officials responded to the call at 5 p.m., Sunday and they were rescued at about 2 a.m.

“During the night, they were able to build a small fire which likely helped them survive the cold,” the sheriff’s office statement said. “However, they were not prepared with supplies for an overnight stay.”

An official whom the sheriff’s office described as an expert snowmobile rider broke trail through the fresh snow and built a pathway to they could ride out on their own snowmobiles.

Sheriff’s officials identified the snowmobilers only as being from out of state. They did not immediately respond to a request for comment Monday morning.