Scotland survived a second-half fightback to kick off their international season with a 44-38 win over Samoa at BT Murrayfield.
The hosts looked to be cruising to a comfortable win when 32-10 up early in the second half, but the tourists fought back gamely in Edinburgh in a match that saw 11 tries.
Two from Stuart McInally, and one each for Stuart Hogg, Huw Jones, Alex Dunbar and Peter Horne proved enough however, to secure a win in Gregor Townsend's first home game in charge of the Dark Blues.
However there was an air of frustration about the stadium in what was an unconvincing performance that got off to a flying start.
Hogg was the early beneficiary of some early fortune for the hosts.
Darryl Marfo, on debut in the front row, was quick on his feet to steal the ball in the ruck and the ball found its way to Tommy Seymour, who booted down the touchline.
The high ball bounced cruelly over the head of Ah See Tuala into the arms of Hogg, who had the easy task of strolling in for a second-minute score.
Samoa forced a couple of penalties soon after as Scotland's discipline was found wanting, and Tim Nanai-Williams eventually made it count before Finn Russell restored the seven-point lead.
Townsend's desire for a fast-paced attacking game had to take a back seat as Samoa did well to upset their rhythm in attack and slow the ball down, before more ill discipline helped Josh Tyrell to barrel over the line from close range and make it 13-10 after half an hour.
There was a lull in proceedings as WP Nel was forced off, but once the ball was back in play a couple of offloads opened up the Samoa defence, Hogg floated the ball out to Jones and the new Glasgow centre beat a weak tackle before scoring in the corner as the hosts started to assert their authority.
They were firmly on top by the end of the half, and made it count as McInally, on his return to the side, forced over from the back of the maul to open up a 25-10 lead at half-time.
After a few words of wisdom from Townsend at the break, Scotland came out a much improved side and showed what they can do with ball in hand.
Russell, who endured an indifferent first-half, made a brilliant 30-metre dash before offloading to Ben Toolis, who fed Price only for the scrum-half to be hauled down just outside the 22.
After several minutes of pressure and a kick to the corner, McInally added his second as the Scottish forwards proved too strong for their counterparts.
There were moans of disappointment from the Edinburgh crowd moments later however, as the TMO awarded Samoa a controversial try after Scotland claimed to have held up Piula Fa'asalele's drive, before Nanai-Williams darted through a gaping hole to reduce the deficit to just eight points.
Dunbar looked to have wrapped the game up in the corner, but Samoa again hit back through Kieron Fonotia to move to within one score of the lead.
However, the hosts' superior fitness eventually told and although Ofisa Treviranus got the 11th try of the match after Horne had raced in from the 22, Scotland clung on to secure the win.
Scotland v Samoa - Match Highlights
Scotland v Samoa - Match Stats
Scotland: (25) 44
Try: Hogg (2'), Jones (35'), McInally (41'+1, 46'), Dunbar (66'), Horne (74')
Conversion: Russell (3', 41'+2, 47'), Horne (76')
Penalty: Russell (15', 25')
Samoa: (10) 38
Try: Tyrell (28'), Fa'asalele (50'), Nanai-Williams (63'), Fonotia (67'), Treviranus (77')
Conversion: Nanai-Williams (28', 51', 64', 69', 78')
Penalty: Nanai-Williams (12')
Man of the Match: Stuart McInally (Scotland)