Niall McGinn scored his first goal in 17 games to earn Aberdeen a point against Dundee United in the race for second place in the Scottish Premiership.

The Northern Ireland winger struck seven minutes after the interval to cancel out an early strike from his international colleague Paul Paton as the match finished 1-1.

The fourth-placed visitors had travelled in hope of cutting the five-point gap between the sides, and their chances of recording a first win of the season over the Dons were boosted as they took the lead just five minutes in.

The home defence were unconvincing in dealing with Ryan Dow's cross, and former Partick Thistle man Paton stepped up to find the bottom-right corner of the net from the edge of the area.

And Jamie Langfield had to be alert to deny them a second just three minutes later, the Dons goalkeeper throwing himself to his left to palm away John Rankin's driven effort.

United's pace, particularly in attacking areas, was always going to cause problems for the likes of Russell Anderson and the Aberdeen captain, back in the side having been rested in midweek, was cautioned within the first 15 minutes after a foul on Stuart Armstrong.

After a nervy 10 minutes, second-placed Aberdeen began to come alive, and Barry Robson's teasing cross left Sean Dillon to turn the ball over his own crossbar. From the resultant corner, Robson exchanged passes with McGinn but shot straight at Radoslaw Cierzniak.

There was a big decision for referee Calum Murray to make just before the half-hour when Mackay-Steven set Armstrong loose. The midfielder raced into the penalty area and tumbled after going shoulder-to-shoulder with Mark Reynolds, but Murray was unmoved and waved away the United appeals.

The action was frantic now, and Aberdeen should have been level after 37 minutes. Adam Rooney knocked down for McGinn inside the area, and the former Celtic man steered an eight-yard strike past Cierzniak, only to see the ball come back off the upright and the danger eventually cleared.

Aberdeen were by now creating the better chances, and it took a timely intervention from Souttar to turn away a Ryan Jack cross before, moments later, Rooney found himself blocking Jack's shot.

However, they could have been two down at the break, as Langfield was forced to block Brian Graham's back-post header.

But Aberdeen continued their onslaught on the visitors' goal, and Cierzniak was at full stretch to turn Robson's dipping volley past the upright.

That only delayed the inevitable, though. Seconds later, Robson provided the cross from the right and McGinn was handily placed to glance home for the first time since the 4-3 win over Inverness in December.

McGinn's barren run had led to calls on social media for him to be dropped, so it was perhaps understandable that he celebrated keenly after finding the net.

Cammy Smith threatened to put the Dons in front with an angled shot which flew over the crossbar, before United made the first change of the game, replacing Mackay-Steven with starlet Ryan Gauld after 64 minutes.

And 10 minutes later, Morgaro Gomis, now in his second spell with the Arabs, took the place of Armstrong in midfield.

That was followed three minutes later by the first Aberdeen change, with Declan McManus coming in for the impressive Smith.

Some of the game's urgency had been lost after the Aberdeen equaliser, but the pace picked up in the dying stages.

Rooney was denied by Cierzniak before Jack struck over from 20 yards, but neither side could find the crucial touch to notch a late winner.

There was, though, a late booking for Gavin Gunning for a handball just outside the united box, but nothing came of what was to prove the last opening of the match.