RANCHO SANTA MARGARITA, Calif. (AP) — Two hikers were recovering from dehydration and minor injuries in Southern California hospitals on Friday after a grueling, four-day hunt for the lost teens met a happy ending, authorities said.

Nicolas Cendoya, who was rescued late Wednesday after being spotted by hikers, was in serious but stable condition at Mission Hospital in Mission Viejo. The hospital released a photo Friday of the smiling 19-year-old pointing his thumb up.

Kyndall Jack, 18, who was discovered Thursday clinging to a rocky outcropping no bigger than a yoga mat on a near-vertical slope, was being treated at University of California, Irvine, Medical Center for dehydration and hypothermia. She remained in intensive care Friday while doctors continued to run tests, said John Murray, a spokesman for the hospital.

“I want to thank all those who never stopped trying to find me and Kyndall,” Cendoya said in a statement.

“The whole time I was lost, I felt the presence of Jesus and my friend, Carlos, who died last year of cancer. I felt they were both with me, inspiring me to stay alive,” he added.

The two had gone missing on Easter, when they called 911 to report they were lost and out of water after wandering off Holy Jim Trail during what they expected would be an easy day hike.

The popular trail is in the Cleveland National Forest, where the dangers of 720 square miles of rugged mountain wilderness run smack up against the planned communities and shopping malls of suburban southeast Orange County.

“I have no doubt that they came out here with the best of intentions … but this is a complicated environment and before you know it, you’re lost,” said Lt. Jason Park, an Orange County sheriff’s spokesman.

Park added that having civilization so close can lull some hikers into a false sense of security.

A reserve deputy who slipped and fell 10 feet, hitting his chest on a rock before falling another 50 feet and hitting his head, remained in serious condition, the Orange County Register reports. A San Bernardino County Sheriff’s search and rescue coordinator told the newspaper the deputy suffered cuts to his head, a punctured lung, broken ribs and other injuries. Park said he is expected to recover.

The teens are expected to remain in the hospital for several days.

Jack and Cendoya had parked their car off a dirt road just a few miles from an upscale neighborhood where on Thursday children bounced on trampolines and customers sipped lattes at a Starbucks in an outdoor strip mall.

The two got separated sometime Sunday night and were both found less than a mile from their car and “very, very close” to one another, although they did not know it, said Park.

Investigators were still trying to determine how they got lost in the wilderness and separated. They tried to talk to Jack after she was found, but she was confused and dehydrated.

Jack had no memory of going hiking or of being with Cendoya, Murray said.

The area where the two got lost is in a section of forest in the Santa Ana Mountains that lies along the border of Orange and Riverside counties southeast of Los Angeles. The trail ranges in elevation from about 2,000 feet to about 4,000 feet.

___

Associated Press writers John Rogers, Andrew Dalton, Christopher Weber and Robert Jablon contributed to this story from Los Angeles.