The concerned canine then refused to let Edinburgh University zoology student Steven leave, barking loudly to alert him to the distressed fox.
Steven, 21, from Moredunvale Loan, eventually spotted the stuck cub and called the Scottish SPCA for help.
He said: “Rover just refused to budge, he stopped dead and began barking like mad. He’s a big gentle giant but usually he’d be giving rabbits and ducks a chase.
“He really seemed to understand that the cub was in trouble and needed help. Only last year I wrote a paper about evolution in canines and the similarities between dogs and foxes so it’s been nice to get an insight into animal behaviour.”
Animal rescue officer Steph Grant arrived to free the male cub, thought to be around ten weeks old, and took him to the charity’s National Wildlife Rescue Centre in Clackmannanshire, where he has been named Jacob.
She said: “The overflow pipe that Jacob had become trapped inside was extremely narrow and there is no way he would have been able to get himself out. Thankfully, I was able to rescue him from the tight spot he was in and, although frightened, he didn’t have any injuries.
“We don’t know how he managed to get himself into the pipe but one thing is for sure, Rover is a true canine hero for finding him.”
National Wildlife Rescue Centre manager Colin Seddon said: “Jacob was very lucky to have been discovered as he would have perished otherwise. He’s coming on really well and is now eating solid food.
“We will keep him until late August/early September before releasing him back to the wild as that is when he would normally move from his native site anyway. He’s been housed with three other fox cubs to help keep him wild.”
Colin also urged members of the public to consider their own safety before rescuing trapped fox cubs.
He added: “Often the parents are somewhere nearby hunting or foraging for food.”