Dundee clinched the Scottish Championship title with a 2-1 victory over Dumbarton - but they were pushed all the way thanks to Hamilton's 10-2 triumph over Morton.
A draw would not have been good enough for Dundee because Hamilton secured the eight-goal victory they needed to jump ahead on goals scored should Paul Hartley's side slip up.
But Dundee, who triumphed thanks to first-half goals from Christian Nade and Peter MacDonald, held on in a nervy end to the campaign in front of 10,718 fans at Dens Park.
Nade had settled the nerves on 25 minutes with a header from Kevin McBride's free-kick and MacDonald doubled the advantage with another header, this time from a cross by Gary Irvine.
Scott Agnew ensured a nervy finish when he tucked away a 69th-minute penalty after Bryan Prunty was fouled by Willie Dyer.
By this time Hamilton were 7-1 up and Dundee escaped another penalty claim before holding on to ensure Dundee was the destination for the helicopter hired by the Scottish Professional Football League to transport the trophy.
Hamilton had let slip the lead in the title race the previous weekend with a 4-1 defeat at Dumbarton, but they did everything in their power on the final day to overturn the two-point deficit.
Mickael Antoine-Curier fired four goals and Anthony Andreu a first-half hat-trick as they thrashed relegated Morton, who hit back twice through former Accies winger Dougie Imrie. Alex Neil's side have to settle for a place in the play-off semi-finals, where they will face either Falkirk or Queen of the South.
Falkirk went into their home game against Alloa with an outside chance of winning the title and Mark Beck hit a double in a 3-1 win.
The defeat looked set to send the Wasps into the League One play-offs but Daniel Carmichael struck a late equaliser for Queen of the South at Cowdenbeath to consign the Fife outfit to a semi-final clash against Ayr. Stranraer face Dunfermline in the other tie.
The League Two play-offs see Clyde facing East Fife and Stirling taking on Annan to see who joins champions Peterhead in League One.