Dundee United manager Robbie Neilson watched his troops keep Ross County’s champagne on ice, before insisting they still hadn’t given up their title hopes.

Paul McMullan’s late winner for Neilson’s promotion hopefuls dashed leaders County’s hopes of wrapping up the Championship title at home to second-bottom Partick Thistle today as they moved to within five points of the Staggies.

United were staring at a fourth straight loss to Ian McCall’s men this season after Steven Bell had given the Somerset Park visitors a 24th-minute headed lead.

But the second-top Tangerines rallied through substitute Pavol Safranko’s stylish 63rd-minute leveller, prior to McMullan finishing the job off in 73 minutes following a nightmare mistake by visiting keeper Ross Doohan.

United are now in pole position to finish second having surged nine points clear of Ayr to close in on that much-desired runners-up spot, but Neilson is refusing to throw in the towel just yet in terms of the title race.

“We’re still gunning for that top spot. There’s still that hope,” said Neilson. "It's outwith our own hands but all we can do is keep winning football matches."

Ayr had won all three previous encounters between the sides this season so arrived on Tayside in decent spirits. For United, Sow made his long-awaited return from a niggling calf injury which had sidelined him in recent weeks.

Eager to impress, the Swedish ace came close to breaking the deadlock in the sixth minute, flashing a 25-yard shot narrowly past Doohan’s far post after latching on to a loose ball.

Then, in 18 minutes, Sow thought he had given the hosts the lead. Callum Booth’s driven ball into the box eluded the entire Ayr defence and Sow was lurking to tap it past Doohan and into the net, only to be judged to have strayed into an offside position.

Instead, it was Ayr who went ahead in stunning style. Andy Murdoch’s searching cross to the far post picked out Bell and he planted a textbook looping header back across goal which caught out home keeper Benjamin Siegrist as he stood stranded.

Neilson must have given his players a tongue-lashing at the interval because they came out a whole lot more purposeful for the second half.

In 54 minutes, Ayr full-back Daniel Harvie was booked for a lunging challenge on McMullan on the edge of the penalty area.

The visitors were still a threat on the counter-attack, though, as shown in 59 minutes.

Defender Michael Rose’s long ball forward set Lawrence Shankland free, but the striker’s first touch was unusually poor and Siegrist came off his line to gather.

However, Safranko soon hit a spectacular equaliser having only been on the park a mere four minutes. Ian Harkes’ cross was helped on by Watson. Slovakian Safranko took the ball on his chest before sending an unstoppable volleyed into the top corner from 12 yards

McMullan then sealed the points when a horror pass from Doohan intended for Harvie was intercepted by the winger. With only the keeper to beat, McMullan took a touch and thrashed a low shot into the far corner to send the home fans wild.

United had at long last got the better of Ayr whose legs deserted them in the closing stages to allow the hosts to see out victory.

“I thought our lads just ran out of steam near the end,” admitted McCall afterwards.

Dundee United: Siegrist 6, Watson 5, Connolly 6, Reynolds 6, Booth 6 (Clark 59, 2) Harkes 6, Butcher 6, McMullan 8, Pawlett 5, Robson 6, Sow 6 (Safranko 59, 2)

Subs not used: Laidlaw, Fyvie, Nesbitt, Smith, Seaman

Ayr United: Doohan 7, Smith 6, Bell 7 (Docherty 84,1) Rose 6, Harvie 6, Geggan 6 (Kerr 46, 2) Crawford 7, Murdoch 7, McDaid 6, Moffat 7 (Miller 66,2) Shankland 6

Subs: Hare-Reid, Forrest, McGowan, Cadden

Referee: Bobby Madden

Star Man: Paul McMullan (Dundee United)

Att: 4392