Kevin Nisbet scored twice in the first 12 minutes as new Aberdeen head coach Mario Frick enjoyed a winning start in the Scottish Premiership - but only after a tense 90 minutes at Kilmarnock.
Nisbet's brace was an ideal start for the team who started the day in 11th, having lost five of the last six in all competitions.
However, bottom side Kilmarnock made them work for the points, pulling it back to 2-1 and 3-2 at different stages before Findlay Marshall's late goal sealed the win and moved them away from the basement.
Aberdeen had not scored in three games, but had two inside 12 minutes. First, Nisbet netted with a cultured finish after some pinpoint build up play.
And, just four minutes later, the Scotland forward showed his quality again, bending a free-kick away from goalkeeper Nico Mantl that kissed a post on its way in.
Greg Kiltie revived hope for the home side when he pounced on slow defending to narrow the deficit, but former Kilmarnock captain Brad Lyons converted with a powerful header to restore Aberdeen's two-goal advantage with some electric play.
Kilmarnock piled on the pressure in the second half, determined to make up for their shaky start, and were helped further when Aberdeen goalkeeper Muller passed the ball to substitute Tyreece John-Jules, who composed himself to convert.
Jamie Brandon had a huge opportunity to level, but couldn't hit the target as Kilmarnock continued to chase the equaliser they craved.
And Neil McCann's side were punished late on.
After last-ditch defending by Nicky Devlin denied them from a corner, young substitute Marshall made no mistake on the counter to score his first senior goal for Aberdeen, and secure a winning start to life under Frick.