Reduced to 12 men in the dying seconds of the match after Kane Linnett's sin-binning for a professional foul, they got the better of four decisions by the replay official and also had the wayward goal-kicking by Samson Langi to thank as they came through to claim only their second World Cup win in spite of losing the try count 5-4.
It was a vibrant encounter that provided a much-needed tonic in these parts set against a background of what was almost a sick caricature of the image of industrial relations in England's north.
Yesterday, of all days, with this rugby league daft town enjoying one of its great days, Tata, one of the biggest employers in the area, appeared to decide this was the opportunity to announce that 500 jobs were to go at their Workington, Scunthorpe and Tees-side plants.
Whether it was an exhibition of the indefatigable spirit of the locals or merely just how important this sport is to them, Derwent Park was packed to the extent that the crowd spilled over into areas behind the posts that they were not supposed to be in, causing some pre-match consternation for officials. The 7630 attendance was the biggest here for almost 20 years.
The tone for much of the match was set early on, a handling error by the Scots resulting in eight minutes of Tongan domination before they opened the scoring, their pounding running eventually taking its toll when Sika Manu put Glen Fisi'iahi clean through at point-blank range.
With most in the ground supporting the Scots, who have been based in Workington in the build-up and apparently have been popular guests, a sense of apprehension seemed to greet that unconverted score, but fears that the floodgates would instantly open were immediately dispelled as Tonga failed to field the restart. That allowed Danny Addie to seize upon the bouncing ball within 10 metres of the try line and, on the next carry, Ian Henderson was held up over it.
Duly emboldened by both that period of pressure and a characteristic darting cross-field run by their talisman, Danny Brough, the Scots managed a sustained spell of pressure that led to a try of their own. A wriggling run by Matt Russell produced that score which was followed by a Brough penalty as belief surged through the ranks.
It also felt as if the rugby league gods might be with them as, in stark contrast to the 35 degree heat in which the Scots wilted and were consequently overrun 48-0 by the same opponents during the last World Cup in Australia, chilly rain started to sweep across the pitch.
Cold hands certainly looked like a factor when Fisi'iahi made a hash of trying to gather Ben Fisher's grubber kick, allowing the replacement to land gratefully on the loose ball. Brough converted once more.
The Scots then scored the best try of the half, Addy's wonderful overhand off-load as he was being hauled to the turn sending Brett Carter into the right corner. Brough converted in remarkable fashion, the ball landing on the bar before falling beyond it.
A half-time lead of 20-4 was beyond all Scottish hopes let alone expectations, but they knew the match was far from over and a minute after the restart Daniel Foster's chip-through bounced horribly for Russell and perfectly for Manu to leap and gather before squeezing the ball down.
Nafe Seluini darted over soon after and while they were denied thrice by the TV replay official, he did give one decision their way, awarding Sika Manu a try. Tonga then took the lead after a bizarre passage of play. Benn Hellewell inadvertently headed the ball into an opponent's path as he attempted to field Konrad Hurrell's wild cross-field hack at the ball which soared cross-field, allowing Willie Manu to race clear.
Forced to react, the Scots finally got their backs off the wall, forcing their way downfield and reclaiming the lead in the same way they had first taken it as Russell darted, squirmed and then stretched his way to the line.
Brough then gave opposite number Samson Langi yet another goal-kicking lesson to edge the Scots in front with eight minutes remaining.
Normal service was resumed but in the final minute Kane Linnett was forced into desperate measures, intercepting a pass from a blatantly offside position to thwart an ominous attack.
That left his comrades 47 seconds to hold out and they did so, only just and only after that fifth involvement of the replay official as he decreed that Jason Taumololo had lost the ball in the in-goal area in the last act of the match.
It was a splendid, and memorable, start to the campaign for Scotland.