Ayr ended the season on a high note, grabbing a late winner to sink play-off semi-finalists Peterhead.
A generally poor game saw plenty of chances created but neither goalkeeper was seriously troubled, with most of the excitement reserved for the dying moments of the game.
Peterhead could have been two goals up inside the first 12 minutes. First Allan Youngson set up Bobby Linn who blazed a shot over. Then the roles were reversed with Linn cutting the ball back for Youngson to shoot against the left- hand post.
Ayr attacked without any real menace, and their best chance of the first half saw Andy Reid 's shot saved by the chest of Blue Toon keeper John McCafferty.
The home side should have done better with a free-kick in the 49th minute that saw Linn roll the ball to Chris Hegarty, but his scuffed shot went past the post.
Two minutes later Graeme Sharp missed a sitter, shooting over from just six yards.
Ayr took the lead in the 68th minute, Chris Strain crossing from the right for Jerome Vareille to bullet a header into the net at the back post.
Peterhead were level in stoppage time, substitute Martin Bavidge crossing low into the six-yard box for Keith Gibson to side-foot the equalise,r but straight from the re-start Ayr substitute Gareth Wardlaw netted from close range to grab a dramatic winner.