There are no easy games in the Borders, and the bottom-of-the-table hosts were well organised and determined, especially in the first half. It was unfortunate that their sturdy defence broke down in the final quarter.
Ayr were disrupted at the outset, not least due to the power of Selkirk's scrum. Hooker James Malcolm had to temporarily leave the field after just a few minutes with a bloody ear. Home scrum-half Michael Davies was troubling them too, dashing about here and there.
It wasn't long, though, until stand-off Frazier Climo spotted a gap, dummied beautifully to slip through and offloaded nicely to centre Robbie Fergusson for the opening try, which Climo converted. 0-7.
There were a few tentative moments from Selkirk, but winger Darren Clapperton looked assured with ball in hand. They were helped by Ayr straying offside and, shortly after, a yellow card for George Hunter. The prop pushed flanker Ewan McDougall at the breakdown, with the Selkirk man treating the crowd to a theatrical performance worthy of Benedict Cumberbatch.
Winger Rory Banks got Selkirk on the scoreboard with the resulting penalty. 3-7.
Ayr's line-out wasn't going to plan with some off-target throw-ins and Selkirk capitalised, repeatedly kicking for touch. They crept into Ayr's twenty-two but replacement hooker Lewis Anderson nailed his throw when it mattered and scrum-half Ali Price and winger Richard Dalgleish raced off into Selkirk's half only to knock on.
There were lively breaks by Selkirk's stand-off Dashton Wellman and McDougall and Ayr's full-back Grant Anderson and number eight Pete McCallum, but numerous penalties by both teams, as well as injury assessments and some incredibly slow set-ups at the scrum, took all the zip out of the game for a time.
Selkirk again took their time to sneak into Ayr's half. Some hefty tackles from flanker Will Bordill and Malcolm, back on with his ear stitched up, stopped them in their tracks.
A try was coming though and a couple of free kicks for Selkirk saw them push for the line, despite McCallum and flanker Blair Macpherson leading the Ayr defence. Full-back Josh Welsh scored for the hosts, diving over in the corner. Banks missed the conversion. 8-7.
Hunter, McCallum, Fergusson, Anderson and winger Haddon McPherson all had a go at breaching the Selkirk defence before half-time but got nowhere.
Selkirk extended their lead just after the resumption, with a Banks penalty, which made up for a disallowed drop-goal by Wellman, which everyone in the crowd thought had sailed between the posts. 11-7.
Ayr turned on the power, prop Javan Sebastian barrelling his way up the park, with Bordill, Fergusson and captain Ross Curle in support. Selkirk managed a turnover and Ayr were pinged for not rolling away. But the kick for the corner was kept in thanks to an astonishing limbo-esque pat back by McPherson.
Second row Robert McAlpine used those long legs to propel himself onwards, but the visitors were making heavy weather of it. Just as one thing was going right, another would go wrong. A penalty attempt by Climo hit the post to make matters worse.
No panic from Ayr though. They steadied themselves at the set-pieces and Fergusson and Curle began to unravel the defence. McPherson charged for the line and did well not to get dragged into touch. The ball went flying through the hands to the other side of the pitch and Anderson muscled his way over. Climo converted. 11-14.
It was a real blow to the home team that they lost too many of their front row players and scrums became uncontested, as they had been getting a great shove on throughout the match.
They could do nothing as Curle shot over for a try, converted by Climo. 11-21.
Ayr's tails were up, and replacement back Cameron Taylor flew up the wing for a certain try only to be called back for a forward pass.
With second row Andrew Renwick in the sin bin, it was all downhill for Selkirk. Fergusson, McCallum and Macpherson - spinning his way out of tackles - pushed play right up to the five-metre line and a wonderful pass from Anderson let Curle get his second try of the day and Ayr's bonus point. With Climo off, Curle stepped up to the tee but couldn't get the wide conversion. 11-26.
There was time for one more, and after a rumbling break from replacement prop D'arcy Rae, Fergusson cut a superb angle to claim the fifth try. Curle converted. 11-33.
Ayr now lead the BT Premiership table by six points, but with fourth-placed Hawick visiting Millbrae this Saturday, and Heriot's and Melrose loitering in second and third place, there's still all to play for.
Final score: Selkirk 11 Ayr 33.
- Elena Hogarth.