Local landowner Thomas Beresford tweeted his thanks to the walker and North Yorkshire Police, who alerted him to the struggling sheep. He tweeted pictures of the rescue, showing the sheep peering out of the hole and showing how all of its legs were encased in the mud.
The walker had spotted the sheep was in trouble and used what3words, an app which has divided the entire world up into 3m x 3m squares and given each one a unique three-word code, allowing emergency services to pinpoint the location of a call.
Mr Beresford tweeted: "Sheep Rescue this afternoon thanks to a walker reporting the @what3words location to 101 and to @NYP_Craven for getting in touch via the Rural Watch to locate who owned the land and it was me."
North Yorkshire Police's Craven district Twitter account replied: "Good job all round...great advert for Rural Watch and @what3words. Hope little lamb is ok."