Forfar Athletic, inspired by two-goal Gavin Swankie, got their promotion bid back on track with a thrilling win at fourth-placed Ayr.
The Loons were twice pegged back by a determined United side but Swankie’s second goal of the night proved decisive in the end.
Forfar started positively with Ross Campbell’s driving run halted by Alan Lithgow at the expense of a free-kick. Iain Campbell drove in the 22-yard free-kick but David Hutton dived to save.
Forfar again showed an attacking threat with on-loan Dundee Utd man Dale Hilson having a powerful effort held by Hutton.
Forfar’s early pressure brought a 12th minute opener and it came courtesy of a neat three-man move. Ross Campbell found Hilson, whose cross from the right wing was inch perfect for Swankie, who side-footed home from 15 yards.
Ayr hit back with three corners in a row but the Forfar defence did their job and the danger was cleared. Ross Campbell sent in a deep cross from the right wing and Swankie headed narrowly over under pressure from Lithgow.
Forfar were enjoying most of the play and Swankie sent a 25th-minute dipping shot just wide of the left post with Hutton stranded.
But Ayr equalised on 34 minutes against the run of play, with Martyn Campbell heading down Michael McGowan’ s corner for Craig Malcolm to shoot home.
The Honest Men then missed a glaring opportunity to go ahead just two minutes later when Campbell fired wide from just six yards.
In the last minute of the first half Forfar regained the lead with a fast breakaway from Hilson. The impressive striker ran 50 yards before playing in Templeman who slid the ball beyond the approaching Hutton.
Five minutes after the restart Rab Douglas made a brilliant diving save to claw out Kevin Kyle’s close range header.
The Honest Men hit back for a second time on 62 minutes with Martyn Campbell awarded the goal after a crazy goalmouth scramble following McGowan’s corner.
Swankie was shown a yellow card for protesting at referee Craig Charleston’s award of the goal claiming it was not over the line.
But the Loons striker was celebrating four minutes later after lobbing Hutton to score after latching on to a miscued Jackson Longridge clearance.
Swankie was denied his hat-trick on 81 minutes when Hutton saved his powerful shot from the left of the box.
The Loons survived a late scare when McGowan sent his shot from the edge of the box inches past the left post.