MOUNT BALDY, Calif. — San Bernardino County authorities have rescued four men who spent a night trapped on Mount Baldy while trying to reach the top of three mountains in 24 hours.

The Sheriff’s Department says the hikers mistakenly left a trail Sunday night and got stuck on a ledge 9,500 feet up.

They called for help shortly before midnight. Rescuers using GPS located them, but high winds prevented a helicopter rescue for some nine hours.

A search-and-rescue team hiked in and made sure the men wouldn’t fall down the slope until a helicopter was finally able to lower a hoist and retrieve them Monday morning.

The men, all in their 20s, had hiked Mount San Jacinto and were trying to hike Baldy and Mount San Gorgonio as well in a 24-hour period.