A man hiking in New Jersey who slid down a cliff with his date and landed on a secluded ledge thought the two were stranded — until his Apple Watch sprang into action on its own and called the police.

James Prudenciano, 28, and his partner are "avid hikers," so they didn't think anything of tackling a challenging mountain trail Oct. 14 at Hartshorne Woods Park in Monmouth County, he told NBC New York.

But the two sensed they were in trouble when they realized they were lost and the sun was starting to set.

First, Prudenciano's friend slipped on thorny vines that she couldn't climb back over because of a steep incline. He went to rescue her and the two saw the mountain was too steep to climb up or down, but they tried for two hours to find a way to safety.

Prudenciano had lost his shoe, so he suggested they sit and slide down the mountain, as he had been trained. They both ended up sliding farther than they thought they would, landing hard on different parts of a ledge.

"My leg was twisted and I was already hurt. I had a thorn that went through my foot," Prudenciano said.

"I didn't see much, all I seen was rocks," he said. He was trying to figure out his next move when he heard "911, what's your emergency" from his Apple Watch.

Three agencies responded, according to Middletown police. The hikers were brought to safety by a civilian boater who offered to help.

Prudenciano suffered a fractured back and injuries to his leg and foot, while his date sustained minor injuries, according to NBC New York. Police said they fell about 30 feet.

Prudenciano said he had recently got the watch and was playing with the settings when he decided to turn on the fall detection feature.

According to Apple, if the Apple Watches Series 4 or later detects a hard fall, it will ask the wearer if they would like to contact emergency services. If there is no response and the watch detects the person wearing it has been immobile for a minute, the watch will call emergency services and the person's emergency contacts automatically, sending a location.

The feature can be set up by opening the Apple Watch app, choosing My Watch, Emergency Service SOS and then turning Fall Detection on. Fall Detection is automatically activated for Apple Watch users who indicate their age is 65 or over.