A family trapped atop an isolated 40-foot waterfall in California were rescued after sending an SOS in a bottle, according to a report.

Curtis Whitson, 44, was with his girlfriend, Krystal Ramirez, and his 13-year-old son, Hunter Whitson, when they got stuck up a remote gorge in Arroyo Seco after a rope they needed to climb down was missing.

“It was a little scary,” Hunter told the Washington Post. “We hadn’t seen a single soul the entire trip.”

The trapped hikers initially made a large “SOS” sign on the ground with stones, then wrote a note in a bottle saying, “WE ARE STUCK HERE @ THE WATERFALL GET HELP PLEASE.”

They threw it in the water stuffed inside a green Nalgene water bottle — scratching “HELP!” on each side — knowing it was a long shot and it could be days before friends raised the alarm that they were missing.

Amazingly, just hours later, it was found by two hikers about a quarter-mile downstream, with a search and rescue team finding the family that night in June, they told the paper.

“We were all dead asleep when we suddenly heard the helicopter right above us,” Ramirez, 34, told the Washington Post, adding that they hugged and cried knowing they were safe, and finally got airlifted out the next morning.

“As you can imagine, they were very happy to see us,” pilot Joe Kingman told the paper, saying it was the first time in his 23 years of rescuing people that he’d heard of a message-in-a-bottle working.

Whitson said: “It blows me away how it all came perfectly together. What are the odds?”