Three hikers who got lost in the Coquitlam backcountry are home safe thanks in part to the popular social media platform, Snapchat.

The young men set out on the Swan Falls Loop near Buntzen Lake on Sunday afternoon when they got lost and their phones ran out of battery.

The men, however, had posted several photos to Snapchat during their hike. Family members called 911 around midnight to report them overdue and later confirmed rescuers' assumptions the young men were Snapchat users who would've documented their trip for followers.

Rescuers were able figure out which trail the hikers had been, based on the screen captures sent to them by one of the men’s friends.

“We dispatched the team and I ended up doing some investigation here at home to figure what exactly was going on,” said Coquitlam Search and Rescue manager Michael Coyle.

“There was one very clear photo that showed the trailhead and the name of the trail and then a couple of really identifiable photos from the peak area where they had gotten to the top of the ridge just over on Eagle Ridge.”

The trio was rescued later that evening.

Photos sent on Snapchat are automatically deleted when another user views them. These particular images, however, were stored as “stories,” which last 24 hours, giving rescuers enough time to retrace the hikers’ steps.

Coyle said this case was accidental, but one way hikers can use social media as a safety precaution is to post a photo of themselves at a trailhead.

“It’s the least you can do if you’re not going to do a full trip plan,” he said.

While social media can help rescuers in some cases, Coyle said it’s still important to tell someone where you’re going and leave a detailed itinerary before heading into the backcountry.

With files from CTV Vancouver's Penny Daflos