NIALL McGINN caused quite a stir on his last visit to Rugby Park much to the consternation of the Aberdeen fans.

Yesterday he was at it again but this time the Red Army wholeheartedly approved.

Rather foolishly, McGinn was photographed sitting among the Celtic supporters during the Parkhead side's 2-0 win over Killie on January 5 which seemed most inappropriate even if he is a former employee.

It was hardly the most heinous of crimes, but it was an unfortunate incident Derek McInnes could have done without.

He never doubted his front player's commitment and that was borne out again yesterday as McGinn created both Aberdeen goals to secure a vital victory which closes the gap on Celtic to five points.

A good day for Aberdeen was almost ruined when referee John Beaton gave Kilmarnock a penalty in the final minute for Scott Brown's clumsy challenge on Lee Miller but Craig Slater failed miserably from the spot.

It would have been daylight robbery had Kilmarnock snatched a point and the defeat means that Dundee are now confirmed in the top six.

Relieved manager Derek McInnes said: "Thankfully Scott saved it and redeemed himself after a moment of rashness.

"I thought we were excellent getting up the pitch and some of our build-up play was very controlled.

"Niall McGinn and Jonny Hayes were outstanding and it was really good to watch."

There is a certain elegance about McGinn as he moves with the ball and the Killie defenders were helpless, it seemed, to stop him.

His ball into the box for Rooney in just eight minutes was quite excellent but the Irish striker did not do it justice by glancing a header just wide of the left post.

Barely two minutes later Mark O'Hara had to use all of his skills to divert another deadly McGinn cross over the top from just under the crossbar.

Aberdeen were not a one-man band, however, as they had very good performers all over the pitch with Willo Flood and Kenny McLean controlling the midfield for long spells and Shay Logan excellent as an overlapping fullback.

However, it was from McGinn's free kick five minutes before half-time that the Dons took the lead.

Darryl Westlake had brought down Johnny Hayes 30 yards out, McGinn whipped a great ball to the back post, Donervon Daniels diverted the ball towards the right corner and Rooney made sure heading home from close range.

It was the least Aberdeen deserved after a dominant display but a one-goal lead is always precarious and Kilmarnock stunned their visitors with an equaliser two minutes into the second half.

There had been little indication of a threat from Killie when Alexei Eremenko worked the ball to Tope Obadeyi on the left and he quickly fed Craig Slater in the inside left channel.

The Aberdeen defenders were slow to get out to close him down and the young midfielder slammed a tremendous right foot shot past Scott Brown into the left corner.

Unfortunately for Killie Slater proved to be not so adept from 12 yards in the final minute of the game.

It was a shock to the Dons' system but they quickly regained their composure and their control of the game.

Hayes nearly found the bottom right corner with a stinging left foot shot in 53 minutes but Craig Samson, who had made an equally impressive block from Smith in 15 minutes, got his fingertips to it to push the ball wide.

There were claims for a penalty two minutes later when McGinn pushed the ball past Lee Ashcroft and was knocked to the ground by the defender but John Beaton decided it was a fair challenge.

Fittingly, it was another touch of class from McGinn that settled it for the Dons 21 minutes from time.

Kilmarnock felt they should have had a foul in Aberdeen territory when Magennis went down after a challenge from Mark Reynolds but John Beaton waved play on and they were caught on the counter-attack.

McLean hit a terrific cross-field pass to find the Northern Irishman on the right side of the Killie defence. McGinn fooled David Syme with a drop of his shoulder then hit a great ball to the near post where Smith powered a header last Samson from four yards.

The drama was not over, as Kilmarnock won a penalty in the final minute when Brown bundled over Miller but Slater shot weakly and the relieved Aberdeen keeper was able to save with some ease.

Disappointed Rugby Park boss Gary Locke said: "I thought we were going to take a point at the end but you still have to score from them and, unfortunately for us, Craig missed it.

"I'm not really a manager who tends to moan too much about referees because I think it's unfair but I certainly felt it was a foul on Josh in the build-up to their winner.

"You could tell by the reaction of our supporters that they felt the same way but we didn't get it and we should have defended the cross better."