Motherwell claimed second spot in the Scottish Premiership with a last-gasp 1-0 win over Aberdeen at Pittodrie on Sunday.
Derek McInnes' men looked on course for the draw that would have seen them finish runners-up but defender Craig Reid scrambled the ball home as Aberdeen appealed in vain for a foul.
Both clubs were already assured of a place in the Europa League qualifiers but the result means that Motherwell will enter in round two on July 17, with the Dons kicking off a fortnight earlier.
Champions Celtic completed their campaign with a 3-1 home win over Dundee United and were then presented with the Premiership trophy.
Anthony Stokes scored their 100th SPFL goal of the season and the departing Georgios Samaras added the second from the penalty spot. Top scorer Kris Commons made sure with a late third after a Filip Twardzik own goal had given United hope.
Inverness Caley Thistle finished fifth after beating St Johnstone 2-0 at the Tulloch Caledonian Stadium. Teenager Ryan Christie scored just before the hour mark and Greg Tansey sealed it.