
Ayr United moved to the top of the Scottish Championship after late goals by Mark McKenzie and George Stanger eventually punctured the Hamilton Academical rear-guard.
The Honest Men are one point clear of second-placed Falkirk, but the Bairns have a game in hand.
Jay Henderson had his first-half penalty saved by Dean Lyness and it looked like Ayr might have missed their golden opportunity.
But substitute McKenzie's brilliant back-post header and Stanger's thumped effort from six yards ensured Scott Brown's team have their stint as frontrunners.
It's eight games unbeaten in all competitions for the Somerset Park side, with seven of those being victories.
Next up for them is a Scottish Cup fifth-round tie at home to Hibernian on Friday.
As for Accies, Kevin O'Hara missed a couple of half-chances and it's now four defeats in a row for John Rankin's team, who slip to ninth.