Coastguards said he was minutes from falling and would certainly have died or been very severely injured if he’d fallen.
The 17-year-old youngster was hanging on by his fingertips after sliding down the cliff in a bid to rescue his bulldog Rio after it ran over the edge.
The family were staying at Newlands caravan park when the dog ran off.
The teenager was the first to find the dog and tried to climb down the cliff.
Lyme Regis coastguard station officer Graham Turner said the lad was in a ‘very, very bad place’.
He said: “He was absolutely terrified.
“He went down a bit too quick on a bit too steep a slope and started to slide. It was a very dodgy bit of cliff there.
“When we found him we talked to him to calm him down and tell him not to worry we’d get him back to safety. We do that while we are setting up our gear.
“We tried to tell him we’d get him up first and come back for the dog but he wouldn’t leave it.
“He said we had to bring the dog up or he wasn’t coming. It was very difficult to get him and the dog up together.
“He was a very scared boy and very lucky. Only ten minutes after we got him up we had a massive hailstorm and his hands would have frozen and he would not have been able to hold on.”
Coastguard rescue teams from Lyme Regis and West Bay both went on the rescue mission.
The bulldog, Rio, was hoisted up to safety in a bag.
The teenager was checked over by South West Ambulance paramedics at the scene before going on his way and is believed to have suffered no serious injuries.
Coastguards are also urging walkers near cliffs along the coast to keep their dogs on a lead to avoid similar dangerous situations.
If the dog does go over the advice is not to attempt the rescue.
Julia Gosling of the Maritime and Coastguard Agency said coastguards attend 270 incidents a year involving dogs falling off cliffs.
She said: “Dogs that owners think are predictable can become very excited when they go to the coast.
“Sometimes the dogs will literally run off the cliff. Coastguards are doing these rescues on a regular basis.
“Our coastguard teams are very well trained in rescuing animals and the dog was saved by putting him into a bag and lifting him up.
“If a member of the public tries to rescue a dog for example, they would presumably be trying to pull the animal up themselves causing further danger to the situation.
“Please be cautious close to cliff areas and keep dogs on leads, especially with the unstable nature of cliffs at the moment due to the recent severe weather.”