League leaders Livingston dropped two vital points to keep Ayr United in the promotion chase after a 1-1 draw against Ross County.
The hosts nearly made a terrific start with County defender Franck Escalon doing well to clear from David Bingham after the club's top scorer had been played clear after only 30 seconds by Barry Wilson.
Eddie Cunnington did brilliantly to clear off the line from a John Anderson header after 12 minutes as Livingston continued to press.
But the visitors stunned the league leaders after 19 minutes when Hugh Robertson met a perfect Karim Boukraa cross to send a powerful header into the net.
After some persistent pressure, the hosts equalised after 32 minutes when Wilson got behind the defence before driving a shot into the far corner of the net.
The second half belonged to Jim Leishman's side and they only have themselves to blame for throwing away a number of chances.
Bingham headed just wide and the striker then had a header cleared off the line by Alex Bone.