In August 1980, parents in Scotland had a canny solution for bedtime rebellion. “If you don’t go to bed,” they warned their offspring, “Hercules will come and eat you.”

As every child knew, Hercules, a domesticated grizzly bear, had disappeared that summer, triggering the biggest bear hunt Britain has ever known — and making him famous around the world.

A documentary, Hercules the Bear: A Love Story, which airs on BBC2 on Tuesday, retells how a Scottish couple, Andy and Maggie Robin, raised him as though he was their own son: taking him running and swimming, feeding him eggs, baked beans and sausages, and even occasionally letting him drink shandy and Babycham in the Sheriffmuir pub they ran.

That summer, Hercules, who was supposed to be filming an advert for Kleenex in the Outer Hebrides, went swimming with Andy, but got lost in the water.

For more than three weeks, soldiers, police officers and volunteers searched in vain. Everyone, except Andy, had almost given up hope by the time Hercules was found 24 days later. He had lost about half his weight, which the Robins believed was evidence that he would rather starve than kill the sheep, cattle or wildlife on the island.

The rescue, which involved him being shot with a tranquiliser dart and carried by helicopter back to Andy, made Hercules globally famous. He appeared on talk shows and even had a cameo in the 13th James Bond film, Octopussy, in 1983, alongside Roger Moore.

Hercules the Grizzly Bear with owner Maggie Robin, who is holding a book about him.

Maggie Robin published a book about Hercules in 1981

ALAMY

Anne Logan, a vet who treated Hercules in his later years, said the connection between the Robins family and Hercules was remarkable.

“I don’t think I can impress on people too much the bond they had,” said Logan, 71. “He adored Andy, and Maggie definitely was his mum. Andy was a bit more gung-ho with him, whereas Maggie could read Hercules.

“She would feed him prawns and Heinz beans from the tin — his favourite — to distract him while I was giving him [antibiotic] injections … and occasionally she would say, ‘Oh, we’ll not inject him today, Anne, because he’s not in the best of moods.’”

Andy Robin holds a bottle of champagne while Hercules the Bear playfully puts his paw around Robin's neck.

Andy, a wrestler and lumberjack who died six years ago at the age of 84, first dreamt of adopting a cub after he volunteered to wrestle a black bear known as Terrible Ted for $1,000 while he was performing at the Wonderful World of Sport show in Ontario, Canada.

Maggie, a former Scottish showjumping champion who adored animals, told him: “Oh babe, that would be fabulous,” although she admits in the documentary that everybody else thought it was “a daft idea”.

The couple, who had met at Perth Agricultural Show where Andy was wrestling and Maggie was riding, later discovered that Highland Wildlife Park in Kincraig had three grizzly cubs and agreed to buy one for £50.

They chose the “softest” cub, the one who stayed closest to his mother, and Andy named him Hercules. Zoos rarely sold animals to private individuals, but when they had a surplus of certain species, they would often have to have them put down. The park’s manager, Eddie Orbell, decided it was better to sell the cub than see him killed.

Six months later, when Hercules was nine months old, the Robins, who did not have children, collected him. Orbell, who died in 2014, expected them to end up bringing Hercules back. Instead, the bear lived with the Robins for a quarter of a century until his death in 2000.

Hercules the Bear with children at Dunblane Primary School.

An eventful visit to a local primary school, 1980

BILL KENNEDY/MIRRORPIX/GETTY IMAGES

Andy Robin, his wife Maggie, and Hercules the bear blowing out birthday cake candles.

Hercules’s tenth birthday, 1985

MIRRORPIX

Logan, who still lives near Maggie, now 74, in Clackmannanshire, first came across Hercules when she took her children to Stirling Agricultural Show. “They were booked to do their wrestling act at a ring at the show field,” she recalled. “That was very much in his heyday. He was eight foot tall, and 35, 40 stone. The kids loved it.”

Hercules had retired from his screen career when Logan began treating him in the mid-1990s. She was apprehensive at first: she was used to treating horses, farmyard animals and smaller pets.

“It’s not every day you get to meet a big bear,” she said. “I was a bit wary, because he could have turned around and bitten me if he’d really wanted, but he trusted them, and I trusted Andy and Maggie. He was their family. It’s like when someone has a big labrador — he was just a big, playful boy, but obviously one had to be very aware of his strength.”

She only had one hairy moment with him. “Once he was a bit grumpy, and as I injected him, he swung his head around and snapped his jaws, and saliva sprayed all over my face, and I went, ‘Whoops, that was a bit close,’” she recalled. “It was just a gesture on his part — if he’d wanted to, he could have knocked me over with his head. I’ve had scarier moments with cows than I had with Hercules, to be honest.”

She felt a bond with him herself. “Sometimes I would see him every other day. I was so privileged to be part of their life.”

A young boy in a baseball uniform with a bat standing next to a large bear.

On a trip to California, 1983

MIRRORPIX

Logan was worried that she would one day have to tell Andy it was time to put Hercules down, but he eventually died in his sleep. “There’s always the welfare issue, of ‘is it time to let them go?’ It would have been almost impossible to have that conversation with Andy,” she said. “His death broke both their hearts, and Andy wanted another bear cub, but they were older, it’s a 20-year plus commitment and they would never have been allowed to have one now, with ministry regulations. Could you imagine trying to get a movement permit to move your bear in a bus from A to B now?”

She added: “That’s what makes it such a remarkable story — it couldn’t happen again. I think Maggie says it beautifully: if ever a man was going to be a bear, it would be Andy, and if ever a bear was supposed to be a man, it would be Hercules. They were so well matched, Andy and Herc.”

Hercules the Bear: A Love Story airs on BBC2 at 6pm on Tuesday and is on iPlayer now