Motherwell remain on course for a place in Europe after beating Aberdeen 2-1 at Fir Park only three days after losing narrowly at title-chasing Rangers.
However, Aberdeen now know that they have no chance of playing in Europe next season.
It came as no surprise when the first half developed into a nervy affair as both teams struggled to create any goalscoring opportunities.
Lee Miller did go close for the visitors with an angled 14th-minute drive, while at the other end Chris Porter saw a header deflected just over and Steven Hammell's 25-yard free-kick was tipped over the bar by Dons keeper Jamie Langfield.
The second half was a totally different affair with Motherwell taking the lead in the 61st minute.
A strong run down the right by Stephen Hughes ended with the midfielder crossing for Porter to knock the ball down to substitute Darren Smith. The youngster's first effort hit a defender but he reacted quickly to poke the rebound over the line.
However, the Steelmen's lead only lasted six minutes when Darren Mackie sent a great cross to the back post and substitute Sone Aluko volleyed a great shot past Graeme Smith.
Four minutes later the Dons almost took the lead when Stuart Duff's cross was met at the back post by the head of Barry Nicholson but his effort was superbly saved by keeper Smith.
Within minutes Motherwell were ahead once again when Brian McLean's clearance found David Clarkson and his superb pass found Hughes.
Rather than shoot, Hughes kept his cool to pick out Porter who side-footed home from eight yards out.
In stoppage time Motherwell survived a scare when Chris Maguire's free-kick beat the defensive wall only to rebound off the post.
The ball ricocheted back into play and struck Stephen Craigan before falling kindly into the arms of keeper Smith.
Motherwell now know a win for Celtic over Hibernian on Sunday will see them secure a UEFA Cup slot.