Aberdeen dented visiting Dundee United's aspirations of qualifying for Europe next season, while keeping their own slim hopes alive.
In a pulsating match which flowed from end-to-end, the Dons deservedly ran out narrow 2-1 victors.
Chances were at a premium in the opening exchanges as both sides battled for midfield supremacy.
The visitors were content to play long balls up to Mark De Vries, whose physical presence was asking questions of the Dons' centre-backs.
It was the Dons who took the lead on 30 minutes.
Stuart Duff released Derek Young who advanced to around 22 yards before smashing in a terrific shot which was only parried by Lukasz Zaluska into the path of Richard Foster, who steadied himself before driving the ball home.
United immediately forced Aberdeen on to the back foot and should have been back on terms on 34 minutes.
Willo Flood's clever ball over the top found Lee Wilkie who timed his run to perfection.
His powerful downward header was brilliantly pushed away by Jamie Langfield with Karim Touzani on hand to clear the danger.
Aberdeen had a major let-off on 43 minutes when Danny Grainger's free kick saw Wilkie challenge the Aberdeen keeper.
The ball dropped to Noel Hunt, who prodded his effort goalward only for Touzani to clear off the line.
Aberdeen started the second half in breath-taking fashion as a corner kick from Jeffrey de Visscher went straight across the area with Touzani left on his own at the back post to easily nod home.
But the visitors pulled themselves back into the match on 49 minutes.
Swanson dispossessed Barry Nicholson midway inside the half before driving forward and crashing a great shot in off the right-hand upright.
Aberdeen were unlucky not to extend their lead on 57 minutes when a clever Chris Maguire ball into the area found the head of Lee Miller, but the striker's effort fell kindly into the arms of Zaluska.
Aberdeen went close again on 74 minutes when a de Visscher free-kick was nodded back across the area by Andrew Considine, with the ball falling to Touzani whose snap-shot flew inches wide of the post.
Zaluska denied Dons sub Josh Walker a late goal as he unconvincingly turned the ball round the post from the midfielder's 20-yard free-kick.
The Dons then passed up a great chance to finish the game off when a Miller header from 12 yards was pushed over the crossbar by Zaluska.