Kilmarnock showed a great deal of character to ensure they stayed top of the Scottish Championship.
Ash Taylor fired the Ayrshire side ahead three minutes before half time, but Alistair Roy dealt a blow as he fired home an equaliser in the 65th minute.
But the Killie faithful were on their feet with eight minutes to go thanks to a powerful strike from Oli Shaw that sealed a fine 2-1 win.