A tremendous second-half turnaround saw Aberdeen come from behind to defeat Kilmarnock 3-1 and move back to second in the Ladbrokes Scottish Premiership.

After falling behind to Kris Boyd's close-range finish, Scott McKenna was credited with levelling just after the break before his spectacular strike put them ahead, and Niall McGinn rounded things off with a stunning solo effort.

The Dons therefore leapfrog Rangers, who play Ross County on Sunday, and remain 11 points adrift of league leaders Celtic.

The hosts had started the brighter, with Killie goalkeeper Jamie MacDonald forced to push Shay Logan's third-minute shot round the post after good work from Gary Mackay-Steven on the left.

The goalkeeper had to be alert again to deny McGinn after the Aberdeen forward, making the first start of his second spell at the club, worked his way into the area and unloaded from 17 yards, his shot pushed over the crossbar.

Kilmarnock have been a much improved side under Steve Clarke, and they eased their way into the game, with Boyd heading over the bar from a Jordan Jones cross.

The former Scotland striker opened the scoring in the 28th minute, popping up in the right place to turn home as Greg Taylor's shot squeezed through a number of bodies in the area, despite the furious claims of offside from Dons goalkeeper Danny Rogers.

And it could have been 2-0 just two minutes later, Rogers doing well to spread himself and block Jones' right-footed shot as he drifted in from the left flank.

The home side had a couple of chances to level as the first half drew to a close, but perhaps the better chance fell to Andrew Considine, who should have done better than to direct his header over the bar.

The game, though, was turned on its head within seven minutes of the restart.

The leveller came four minutes after the break as McKenna headed a McGinn corner towards goal which took a deflection and was pushed onto the bar by MacDonald. The ball came back out and was bundled over the line, although there was some confusion as to whether Adam Rooney or McKenna had gotten the final touch.

McKenna was credited by the stadium announcer.

There was no doubt, however, that McKenna was the scorer of the second just three minutes later.

The centre-half found himself in acres of space inside the Kilmarnock half, and launched a 35-yard screamer high into the net, to the astonishment of almost everyone inside Pittodrie.

The visitors threatened a leveller when Boyd's free-kick was fumbled by Rogers, but the goalkeeper reacted well to deny Youssouf Mulumbu from the loose ball.

Things got even better for the Dons when McGinn picked off Gary Dicker and embarked on a tremendous cross-field solo run, which he finished off himself, firing across MacDonald from the corner of the penalty area.

Stephen O'Donnell could have put the visitors back in contention with a 78th-minute effort from Eamonn Brophy's cut-back, but Rogers pulled off an excellent save to deny the former Partick Thistle man.