Italy led Scotland 17-12 at half time following two tries from each side in the final round of 2018 NatWest 6 Nations fixtures.
Tommaso Allan gave Italy a three-point lead before Fraser Brown crossed after a period of sustained pressure for the visitors, on ten minutes.
Italy soon hit back, with Allan dancing past the Scottish defence to score under the posts.
The fly-half exploited a gap on Huw Jones’ right shoulder, as Italy moved into a 10-5 lead.
Matteo Minozzi then extended Italy’s advantage, showing his pace to reach Allan’s clever kick through ahead of the Scottish defenders.
Scotland fought back, with captain John Barclay pulling his side back to within five points.
The Scots set up a strong driving maul from a lineout and muscled their way over to make it 17-12, which is how the scoreline stayed until the half-time whistle.
After the break, Italy thought they had extended their lead through Sebastian Negri, but the TMO brought play back for a knock on.
But after 44 minutes, Allan had his second try of the game, following debutant Jake Polledri’s excellent break.
Scotland had to fight back into the game again and this time it was Sean Maitland who touched down, latching on to Grieg Laidlaw’s long miss pass to put him in the clear.