You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
Japan's stunning upset of Ireland on Saturday shattered the expected permutations of the pool and the Scots knew they needed to get a big win on the board after their dismal defeat to the Irish in their opener.
Winger Sean Maitland and scrumhalf Greig Laidlaw scored converted tries with Stuart Hogg landing a 40-metre drop goal in the first half, while two penalty tries after the break secured the all-important extra point.
Samoa winger Ed Fidow was the offender for both penalty tries and he was shown a yellow card for the first then given his marching orders after crashing into Maitland with his knees to stop the Scot getting over the line in the 74th minute.
All week Scotland had spoken of drawing a line under the Ireland debacle and of ensuring that they would enforce their will on Samoa and deliver a performance the country could be proud of.
They did all that and more against a side who have traditionally given them problems.
Townsend made five changes to the side that rolled over and showed Ireland their belly in Yokohama, but it was the established halfback pairing of Laidlaw and Finn Russell that gave the Scots an early lift.
Laidlaw's eighth-minute penalty sent them on their way, prompting a quick blast from The Proclaimers' song, "I'm on my way (from misery to happiness today)," through the stadium's sound system.
Samoa were missing suspended centre Rey Lee-lo and hooker Motu Matu'u after their three-game bans for high hits on Russian players in their opener but that did not dampen the ferocity of their tackling in the slightest.
Scotland began to turn the screw as the clock ticked towards the half-hour mark and a superb box kick from Russell was collected under pressure by Maitland, who held off Belgium Tualagaloa's tackle to spin across the line.
Less than five minutes later Scotland had their second try, Russell with the offload, Jamie Ritchie with the inside pass to Laidlaw and the scrumhalf pinballing off some weak Samoan tackles to cross the line.
Scotland have failed to make it out of the pool phase at a World Cup only once, when they finished behind England and Argentina in 2011, but Japan's stunning win over the Irish has complicated matters for them here.
Captain Stuart McInally said in the build-up that they would not go chasing a bonus-point win from the very start but with the game pretty much safe at 20-0 the Scots pushed hard after the break.
After weathering some early pressure Scotland were awarded a penalty try in the 57th minute when Samoa were pulled up for an infringement at the maul, with winger Fidow sent to the sin bin -- the Samoans' third yellow card in two games.
Scotland piled it on but failed to take advantage of their numerical supremacy as Samoa defended for their lives until Fidow returned to the field.
He did not stay there long.
With Maitland sliding for the line in the corner, Fidow flew into him recklessly, a challenge that brought a second yellow and subsequent red card for the Samoan winger.
Scotland have been criticized heavily for failing to keep opponents from scoring tries early on so they will take comfort from keeping Samoa off the board entirely on Monday.
The Scots next play Russia on Oct. 9 before taking on hosts Japan four days later in a match that could decide who goes through to the quarter-finals.