A California couple who went missing for about a week after a Valentine’s Day hike were rescued Saturday, two days after officials had given up hope that they would be found alive.

Carol Kiparsky, 77, and Ian Irwin, 72, were last seen at an Airbnb they were renting in Inverness, Calif., on Feb. 14. They were supposed to check out on Feb. 15, which is when their belongings, including a phone, their wallets and a car, were found at the vacation cottage, a Marin County Sheriff’s Office spokesman told The Washington Post. A search by state, local and federal agencies began on Feb. 16, but the effort was reclassified as a recovery mission on Thursday.

“Carol and Ian’s survival is truly a miracle, and we are so happy for the family,” Sgt. Brenton Schneider told The Post. “They found themselves in trouble, and they kept going.”

Kiparsky and Irwin ventured into the wilderness near Tomales Bay unprepared for a long hike or the cold night. The couple wanted to watch the sunset but took a wrong turn after it got dark, one of their sons, John Kiparsky, told local media.

They ventured into an area of dense vegetation and a steep incline and couldn’t make it out on their own. They survived by drinking from a puddle and eating plants, Schneider said at a news conference.

Days before the rescue, police announced that they hadn’t found the couple but that cadaver dogs might have picked up a scent.

“We believe that our extensive search efforts with every resource that has been available to us would have located Carol and Ian if they were responsive or in an area accessible by foot on land,” officials said in a statement at the time.

The team that found the couple had stopped to take a break and heard them calling out for help. A police dog named Groot arrived first and led rescuers to the pair. The brush was so thick in the area they were found that rescuers had to crawl to reach them.

The couple were so relieved to be found that Ian Irwin sang Lou Rawls’s 1960s jazz classic “I’d Rather Drink Muddy Water” as a reference to what the couple did to survive, John Kiparsky told a reporter.

Schneider said the couple were in “great spirits” on Saturday.

“They also wanted to pass along their thanks to everyone who has been keeping them in their thoughts and all never losing hope,” he said.

Irwin and Kiparsky are prominent academics, the Associated Press reported. Irwin, a leading Parkinson’s disease researcher, is known for his work on the team that identified what was causing Parkinson’s among heroin users in the 1980s. Kiparsky, a prominent linguist, has written several books about language, including 1975′s “The Gooficon: A Repair Manual for English.”

Read more: