A pair of girls exploring Utah's mountains were struck by lightning, but were able to be rescued thanks to the quick-thinking of their dog.

The girls, ages 8 and 16, were on a camping family reunion when they decided to do a bit of exploring Friday morning.

The Beaver County Sheriff's Office said they took an ATV into the Beaver Mountains near Big Flat, with the dog in tow. They hopped off to walk around and upon returning to the ATV, both were struck by lightning.

The dog trotted back to camp to find the family, which followed the pup to the unconscious girls. The sheriff's office said they received the emergency call about 10:45 a.m.

Both girls were taken to a hospital by helicopter. The sheriff's office reported the 8-year-old as in critical condition and the 16-year-old in serious, but stable condition.