Thirteen years ago a young Scottish schoolboy lost his first game of bowls by 47 shots to one.

It might have put him off the sport for life. But yesterday Stewart Anderson could afford to smile at the memory as he was crowned indoor champion of the world at Potters Leisure resort after beating one of the legends of the game in what many experts were quick to hail as the greatest final in the history of the competition.

BBC commentator David Corkhill and World Bowls Tour chief Richard Maddison were among those who, having seen most of the contenders in the 34 years since David Bryant won the very first world indoor singles title in 1979, had no hesitation in declaring Anderson's 10-10 10-9 victory over four times former champion Paul Foster as the best, both in terms of quality and drama.

The result denied Foster a unique sweep of singles, pairs and mixed pairs titles and also stopped the 39-year-old from Troon matching another great Scot, his friend and pairs partner Alex Marshall, by taking the singles crown for the fifth time.

And it also ensured that 2013 will be remembered as a year when the future of the sport was transferred into younger hands as 27-year-old Anderson's success followed that of Norfolk 23-year-old Rebecca Field in the ladies singles. Their ages combined come to less, by seven years, than that of last year's champion Andy Thomson.

Anderson is ironically the youngest winner of the open singles since Foster, a close friend who lives only 15 miles away in Ayrshire, won his first title at the age of 24 in 1999.

The youngest, at 22, was Hugh Duff, who just happened to be a member of Anderson's club, back in 1988.

Yet it was another neighbour, a certain David Gourlay, the 1996 world champion, who was Anderson's inspiration – having told his father Billy many years ago that he thought young Stewart could go on to emulate Duff, and taking a close interest in his progress ever since.

Anderson would prove the validity of Gourlay's extravagent assessment, by beating him in an epic semi-final, the decisive bowl in the 5-5 9-4 classic being voted, by Corkhill, as the BBC's shot of the tournament.

The other of Saturday's all Scottish semi-finals was equally monumental, with Foster needing his first tie-break of the competition to beat Colin Walker 7-5 4-8 2-0.

It appeared that the final, so often an anti-climax, would struggle to top either of those. But it did.

From the opening end, when Foster, two down as he delivered his last bowl, ran the jack onto his own back wood for two, the quality was unrelenting and extraordinary.

Anderson was unfazed, drawing meticulously to take the next two ends for a 3-2 lead. But if there was any doubt that he'd need to play the game of his life to beat Foster for the first time it came when the older man, despite the relentless accuracy of his younger opponent, fought back with guile to lead 6-4 after seven ends.

Anderson's response was spectacular as he ruthlessly exploited a lapse by Foster on the next end to turn the set round with a full house of four. And in a thrilling ninth end, with both men having a wood, according to the official, two inches from the jack, Foster played with weight to dispense with the need to measure – and succeeded only in taking out his to give Anderson a two for a 10-6 lead.

That's when Foster showed what a great champion he is by rescuing a half with four shots from the last two ends. And after Anderson, unflustered by the apparent missed chance, raced to a 6-1 lead in the opening four ends of the second set, Foster replied with a four of his own with a stunning last wood running shot.

Again Anderson took a grip, winning the next three ends to open a 9-5 advantage with four to play. And again Foster cut short any thoughts of him running away with it with a single, a two and another single from three intense ends – given all the more frisson by the new 30-second shotclock – to incredibly level the scores with one end to go.

Anyone of the opinion that bowls lacks in excitement might have changed their views if they had been there to feel the rising tension and heard the rise in decibels in the International Arena which marked the start of that final end.

There could be be no tie-break in this final. This was as sudden-death as it comes. Anderson's response was to put his first wood, like so many others, two inches from the jack. Foster, close as he came, couldn't beat it – and when his final attempt fell short Anderson covered his face to hide his tears of joy before rushing to embrace his equally emotional father Billy, who proudly confirmed there are two younger sons coming through, both of whom might be challenging their world beating brother in years ahead.

In the meantime Scottish bowling appears to have the future world dominance, as established by Duff, Gourlay, Marshall and Foster well assured.

Yet warehouseman Anderson, having pocketed a £45,000 winner's cheque, isn't looking to matching the multi-title feats of his friends and mentors, saying: 'I'll settle for this one for now. I still can't believe I'm the world indoor singles champion.

'I've never beaten Paul before and I knew I would have to put him under pressure to beat someone of his class. But it's unbelieveable really.'

Foster, who also stepped off the rink to give Billy Anderson a congratulatory hug, said: 'The match was always there to be won and I paid the price for going to sleep a couple of times. But this was Stewart's day. He's been brilliant all year and I've no doubt he'll win many more.'

As for that eye-watering first bowls experience, it clearly didn't leave much of a scar: 'I think I just looked for another partner,' he said.