Berwick Rangers 2 Ayr United 1
Already doomed to the third division, Berwick produced a battling display to end their home season with an unexpected win.
Ayr should have had it all wrapped up by the interval. They went ahead after three minutes when Paddy Connolly took advantage of sloppy defending by driving the ball past Gary O'Connor.
Darren Smith equalised within seven minutes when he crashed home a Gordon Connelly cross.
The visitors then took control. Mark Smith hammered a great free-kick against the cross bar, and Connolly saw his shot hit an upright and rebound to O'Connor, who turned the ball for a corner.
Following this O'Connor saved brilliantly from Stuart Boyd's carefully-aimed shot.
Three minutes into the second half Berwick went ahead when Kevin Gordon nipped in to net as Ludovic Roy prepared to collect Connelly's cross.
From then on Ayr lost their form and Berwick came close to scoring again when Roy made a great save at the foot of the post from Gordon.
An encouraging aspect for Berwick was the excellent performance of teenager Mark McGarty, who hardly put a foot wrong as an emergency left-back.