In the opening set, both won five ends apiece. The scoreline stood at 4-4 after six but a double gave Foster the edge at 6-4. However, Anderston countered with four inch-perfect deliveries to take an 8-6 advantage and he increased that to 10-6 with two ends remaining.
In a high drama chase, Foster, with four singles titles under his belt, replied with a treble and held a set lie only for Anderson to draw the second shot to share the set at 10-10.
In the second set, Anderson continued to demonstrate his awesome precision and forged into a 6-1 four-end lead but a wonder take-out by Foster brought the audience to their feet as he claimed a full house to reduce the advantage.
Once again Anderson did all the hard work and opened up a 9-5 cushion and once again Foster showed his hunger for a record-equalling fifth singles crown with a 1, 2 and 1 to level at 9-9 and set the stage for a one-end spectacle where the winner of the last end would be crowned champion.
Foster cast the jack and ran just fractionally past with his first bowl but Anderson calmly rolled only inches from the jack to put the pressure on Foster. As the end played out, Foster delivered his last bowl which also finished inches from the jack but refused to fall over leaving Anderson's opening bowl as the match-winner to give him first world singles title.
Anderson said: "I took up bowling in 1998, when I was 13, the same year Paul won his first world title in Preston. To win this title 14 years later is a dream."
Foster said "Stewart played the better bowls and I was always chasing. His first two bowls were always on target and he was more consistent than me over the piece."
The previous day, in the first all-Scottish semi-final since 2001, Anderson met Bowls Scotland head coach and world No.4 David Gourlay and although he won 5-5, 9-4 the match was marred by spec-tators arriving late for the start which was continually interrupted.
Foster got over the line in a tie-break in his semi-final against qualifier Midlothian's Colin Walker 7-5, 4-8, 2-0.