Aberdeen bounced back from a 5-2 thrashing against Celtic to beat Dundee United 3-1 thanks to a Scott Vernon hat-trick.
Already assured of UEFA Europa League qualifying spot, Aberdeen edged four points clear of Motherwell – who have two games remaining - in the scramble to finish second in the Scottish Premiership as Vernon took centre stage at Tannadice Park.
The former Oldham Athletic and Blackpool striker netted his first in the seventh minute after firing low past Marc McCallum, but United were level 11 minutes before the break through Sean Dillon's first of the campaign.
An unstoppable Vernon header from Barry Robson's 55th-minute corner put Aberdeen back in front before the 30-year-old claimed the match ball 14 minutes from time following a defensive mistake.
Tuesday's other game saw Ross County secure Scottish Premiership safety by defeating Hibernian 1-0 at Dingwall.
Richard Brittain kept his cool to score the only goal of the game from the penalty spot just after the hour mark.