AS she roared herself hoarse with around 40,000 of her compatriots in St James’ Park at the weekend, Scot JK Rowling must have concluded that fact is indeed more remarkable than fiction. Even Harry Potter himself couldn’t have conjured up a more rousing finale to Newcastle’s spell in the Rugby World Cup spotlight.

The third and final game to be staged on Tyneside proved the best match of the tournament so far, with Scotland’s players having to summon every ounce of available resolve as they secured a quarter-final date with Australia at Twickenham on Sunday.

The 49 first-half points that were shared between the two sides represented a World Cup record, and while some of the defending was wretched, the sight of both teams throwing caution to the wind and cutting loose at will made the hairs stand on end.

The second half was a much more structured affair, but while Scotland successfully transformed a three-point interval deficit into a three-point margin of success, the final outcome remained in the balance until the very last second.

Ultimately, Scotland’s superior game management and discipline told, but it was an exceptionally close-run thing. Samoa, who knew they had no chance of making the last eight at kick off, successfully restored some pride. Their opponents exorcised the demons of 2011, when they went out of the World Cup at the pool stage for the first time in their history, but will have to improve markedly if they are to triumph against the Wallabies in six days time.

“I’m really proud of the boys and the way they played,” said Scotland head coach Vern Cotter, who was understandably keen to accentuate the positive aspects of his side’s performance. “It was a tough game.  We were down at half-time, but we showed the necessary character and resources to come back and finish the job.

“That’s phase one over, and now we can move on to the next step, which is the knock-out. I genuinely thought there were some good things out there because we came across a Samoa team we hadn’t seen at the World Cup.

“They were impressive, and we had to change the way we were playing, but we got there in the end and it’s credit to the players for taking things on board and playing accordingly.”

Scotland can certainly take some positives from their attacking play, which resulted in first-half tries for Tommy Seymour and John Hardie, and a crucial late score from scrum-half Greig Laidlaw, who skirted over from the fringe of a close-range scrum with six minutes left to effectively confirm his side’s victory.

Laidlaw scored 26 of Scotland’s points, and while his decision making was all over the place at times, with a number of kickable penalties spurned in a futile attempt to chase a try from a line-out, his positive leadership was ultimately important.

The quality of Scotland’s second-half tackling was also crucial, with Hardie and David Denton in particular raising their game to help plug the gaping holes that were apparent throughout the first half. By halting Samoa’s midfield runners and keeping a lid on the second-half penalty count, Scotland managed to squeeze the life out of their opponents in a crucial third quarter that saw Cotter’s side claim a match-changing run of 13 unanswered points.

Yet for all that the Scots deserve credit for turning the tactical battle in their favour – something England couldn’t even come close to doing during either of their defeats to Wales and Australia – the sight of their defence being repeatedly ripped apart before the interval was an alarming one given what is to come.

Samoan centre Rey Lee-Lo was like a wrecking ball before the break, repeatedly punching holes in a powder-puff Scottish defensive line and playing a major hand in all three of the Pacific Nation’s first-half tries.

His line break enabled Tusi Pisi to cross in the corner, he was part of a rapier-like attacking move that ended with Manu Leiataua scoring again moments later, and he claimed a try of his own midway through the first half as he crashed over following a deft pass from Pisi.

Lee-Lo’s performance was remarkable, but with respect to the Cardiff Blues centre, he is hardly an Israel Folau, Matt Giteau or Bernard Foley. Widely regarded as the best attacking unit in the tournament, Australia’s flyers will be licking their lips at the prospect of inflicting further damage on the Scots this weekend.

Samoa claimed a fourth try in the final minutes, with replacement prop Motu Matu’u crashing over from close range, but Scotland successfully saw the game out to ensure they claimed second spot in Pool B behind South Africa.

“We will be very honest in the way we review the game,” said Cotter. “They were playing Barbarians rugby at times, and they went to the wide channels a lot more than most other teams.

“We will be reviewing the way we tried to cope with that. We’ll have a look at the team we’re going to be playing against and plan accordingly. But I’m delighted for this group of players that we’ve got the first part of the job done.”