A flawless kicking display by Chris Paterson gave Scotland an 18-16 World Cup win over Italy and a place in the quarter-finals place at the expense of their opponents in a tense but scrappy Pool C eliminator in St Etienne.
In a game dominated by the boot, the Gloucester utility back won his kicking duel with opposite number David Bortolussi - nailing six penalties out of six to maintain his 100% tournament record.
Bortolussi was successful with a conversion and three penalties but missed a trio of three-pointers - the final one with four minutes left on the clock - and that was ultimately the difference.
The Azzurri, who scored the game's only try through captain and scrum-half Alessandro Troncon, failed in their latest attempt to reach the quarter-finals for the first time in their history.
But Frank Hadden's side live to fight another day - and they face a probable Paris showdown with Argentina on October 7. They will have to improve on this effort, though.
Paterson's kicking kept the scoreboard ticking over, and was ultimately the reason why the Scots progressed through to the knockout stages for the sixth World Cup in succession.
His first penalty arrived after just two minutes.
Achieving turnover ball at the first ruck contest, the men in blue forced the Italians to infringe at the resulting scrum - and the reliable Paterson knocked over his kick from the diagonal.
The winger was at it again three minutes later, after Scotland won another battle at the breakdown following a counter-attack.
Paterson - this time from the right flank - calmly stroked over to make it 6-0 after just five minutes.
Italy came back into the match more through dogged determination than anything else, and capitalised on a host of Scotland errors to go 10-6 ahead.
Despite having Mauro Bergamasco sin-binned for an early tackle, they started to dominate territory and scored a try from their first meaningful attack.
Rory Lamont spilled an up-and-under - and after Italy gathered the rebound, Troncon - making his 101st appearance for his country - dummied a pass right, before squirming over from three yards.
Bortolussi converted and added a penalty moments later to give the Azzurri a four-point cushion, but two Paterson penalties just before the break made it 12-10 to the Scots going into the interval.
By that time, Lamont had gone off injured - to be replaced by Hugo Southwell - and Scotland were searching for their best form.
But the ever-reliable Paterson could not be faulted, and two penalties in the first 12 minutes of the second period put Scotland 18-10 up.
The contest was hardly thrill-a-minute as the error count increased, and it remained a battle of the boot.
Scotland suffered a blow when Nathan Hines was sin-binned for a high tackle - and in the 10 minutes the lock was off, Bortolussi struck two successful three-pointers to put Italy within two points going into the final quarter.
It remained nip and tuck, with running rugby at a bare minimum, and the tension built to a crescendo in the final 10 minutes.
Both sides were desperate to keep their discipline with just two points in it.
Scotland were the first to infringe, replacement prop Craig Smith coming in at the side of a ruck in the 76th minute.
Bortolussi had the chance to win the game for Italy, but his kick drifted agonisingly wide - and Scotland held on to go through.