Liam Boyce headed County into the lead midway through the first half but Henry Anier levelled after 57 minutes.
But United were reduced to 10 men on the hour mark when Mark Durnan was sent off for preventing Brian Graham a clear run at goal and, after the ex- United striker Graham put the home team ahead from the ensuing penalty, there looked as if there was only going to be one winner.
Anier equalised again, though, to level the scores at 2-2 and United captured last-gasp glory when McKay met a Blair Spittal cross to head United through to the semi-finals.
Arnaud Djoum’s first half header was enough to beat Partick Thistle 1-0 and move Hearts to within six points of second-placed Aberdeen in the Scottish Premiership. Supporters witnessed a bizarre first half protest when a plane flew over the stadium carrying the message “No style, no bottle, Neilson out”. Boos rang out among sections of the capacity home crowd before Hearts fans started to chant “There’s only one Robbie Neilson”.
Following a period of concerted pressure from the home side, Djoum found the net from a Don Cowie corner in the 25th minute as Neilson’s side registered their third successive win in the league.
Louis Laing scored Motherwell’s first goal at New Douglas Park for seven years to give his side a 1-0 Lanarkshire derby win over Hamilton.
Laing finished clinically from close range from a 45th-minute corner from Steven Hammell, as Motherwell moved up to seventh in the Premiership, one point off the top six and seven points above the play-off spot.
The Motherwell striker Louis Moult had an 81st-minute penalty saved during a nonetheless comfortable second half for the visitors.
Laing’s goal was Motherwell’s first at the venue since Lukas Jutkiewicz hit a late equaliser in November 2009, six months after their previous win in Hamilton, when Mark McGhee was in his first spell as Fir Park manager. They had failed to score in seven previous visits, including a Scottish Cup defeat by Albion Rovers.
guardian.co.uk © Guardian News and Media Limited 2010