Rome - Italy coach Conor O'Shea conceded he was "destroyed" as Scotland snatched a last-gasp 29-27 win to break Italian hearts in a thrilling Six Nations finale at the Stadio Olympico in Rome on Saturday.
Italy had dominated, leading 17-12 at half-time but suffered their 17th straight defeat after a 79th minute penalty by Greig Laidlaw handed Scotland third place in the tournament as the Italians finished with the wooden spoon for the third time in five years.
"I'm destroyed for the lads and the fans but we've seen our future, the style and the game that we want, the quality of our young players," said Italy coach Conor O'Shea.
"There's so many positives. I'm really, really proud of our players they put in a great performance, and played some amazing rugby."
Scotland's slim title hopes had been extinguished with defeat to Ireland last week but they propelled themselves up the table from fifth to third after home wins against France and England.
"This win is as valuable as the win against England," said Scotland coach Gregor Townsend, whose side claimed their first away championship win since beating Italy two years ago.
"Italy were in control for most of the game, but our fitness was a factor and we dominated the second half," he added.
"It's good for us to get three wins. It's not often that happens in the Six Nations."
Italy finish bottom of the table for the third straight year with five defeats in five games, with captain Sergio Parisse suffering his 100th Test defeat.
"I'm disappointed but today we showed we're a great team. I saw determination and courage, despite the criticism," said Parisse, who earned his 65th cap in the Six Nations, to equal the championship record of Ireland's Brian O'Driscoll.
Italy's Tommaso Allan, who played for Scotland at Under-20 level, gave an inspirational performance winning the man of the match award as he accounted for 22 of of Italy's points.
The Italians - whose losing streak in the Six Nations stretches back to 2015 against Scotland in Murrayfield - had gotten off to a blistering start.
The 24-year-old Allan touched down after 14 and 45 minutes with Matteo Minozzi getting a third for the hosts after 21 minutes.
Scotland's Fraser Brown (10) and John Barclay (25) both scored tries, in the first half, with Sean Maitland (61) and Stuart Hogg (71) adding two more in the second half.
Scotland led 5-3 after ten minutes when Brown touched down after Allan's opening penalty, but Laidlaw send the conversion wide.
But Allan pulled Italy ahead 12-5 after quarter-of-an-hour to the delight of the 60,000 crowd with Minozzi slotting down as the hosts opened up a 17-5 lead after 22 minutes.
Back after the break Sebastian Negri looked to have scored a quick try for the hosts as he burst through the post to dot down but it was disallowed because of a knock-on in the build-up.
But two minutes later Allan broke through as newcomer Jake Polledri created an opportunity following a sloppy turnover in the Scottish midfield offloading to Allan who raced through and then converted to open up a 12-point lead after 46 minutes.
Maitland pushed through for another try with Laidlaw again converting from a tight angle to pull Scotland 24-19, before Hogg pulled the Scots level.
In a drama-filled five final minutes Allan opened up a one-point lead after Jonny Gray was penalised on the floor, with Hogg breaking clear for Scotland's fourth try and the bonus point.
And with just one minute to goal after the home side collapsed a maul, Laidlaw slotted in another penalty for his ninth point of the afternoon to break Italian hearts.
"The second half response and resilience was great," said Townsend.
"For the first 70 minutes Italy were favourites to win, but we showed focus and energy and pulled through."