A woman was rescued after getting lost for days in the woods with her husband, with officials saying their dog may have helped her stay alive by keeping her warm.

John Helmstadter, 82, and Pamela Helmstadter, 72, set out for a walk in the woods near their home in Alexander, Maine, without their cellphones last week, the Maine Warden Service said in a statement.

The couple got lost away from a trail, and John fell, the Warden Service said. He wasn’t able to get up, and his wife set out for help, but she “got disoriented in the woods and could not get home,” it said.

Pamela spent four nights freezing and lost and was found “severely hypothermic but alert with her dog by her side,” the Warden Service said. The lowest temperatures in Alexander that week ranged from 26 to 44 degrees Fahrenheit, according to AccuWeather.

Pamela was found “over a mile from their home” around 2:30 p.m. Thursday, the Warden Service said. Her husband was found dead half an hour later about 200 yards away, the statement added.

Their black Labrador was named Lucy, the Portland Press Herald reported.

When she was found, “her dog was being very protective of her and even laid down on top of her on her chest,” Sgt. Josh Beal of the Warden Service told Portland news station WMTW. “It sounds like that’s what the dog would do at night as well, to help keep her warm.”

“She did very well to survive for that long,” Beal added. When she was found, Pamela had a body temperature of 32 C, the Warden Service said, and had given up hope of being rescued until she heard the sound of a Warden Service plane circling over her.

A neighbor noticed that a package on the couple’s porch had not been collected in days and alerted the Washington County Sheriff’s Office, the statement said.

“I knew if I wasn’t found that day, I wasn’t going to survive,” Pamela told ABC News in an interview from a hospital. She said she had walked that trail for many years and regretted not taking a cellphone with them.

Beal said that after John’s fall, the couple made the decision for Pamela to try to get help. “She was more physically capable than he was, Beal said.

“I told him: ‘I’ll come back for you as soon as I find out where we are,’” Pamela said, adding that she started eating “peat moss” to stay alive after days in the cold without food.

Pamela said she felt “a lot of sadness and grief.”

“We were married for 31 years, and we had a good life together,” she said.

RECOMMENDED VIDEO