Graham Carey’s first minute volley allowed St Johnstone to end their Premier Sports Cup group campaign with victory.
But that was not enough to prevent the Perth club from failing to advance to the knockout stage of the competition.
Callum Davidson’s men finish Group F in third behind League Two Annan and League One Queen of the South.
The big news on the team-sheet front was that Drey Wright was given the nod for a first start, replacing Michael O’Halloran in the right wing-back role.
Dan Cleary and Cammy MacPherson also returned to the starting line-up having served their two game bans picked up in the group opener against Annan Athletic. John Mahon and Murray Davidson dropped to the bench.
The other change was in the forward department and saw Theo Bair miss out completely after injuring his shin against Elgin City on Tuesday night. That paved the way for Stevie May to start up top.
Manager Callum Davidson insisted his side were on the hunt for goals and plenty of them. The Perth boss couldn’t have wished for a better start when, in the first minute, Saints had the lead.
The initial architect was Wright who wasted little time in showing off his ability to beat his opposite number down the wing. A quick shuffle created space for the cross, which was initially cleared.
But Carey, famed for his long-range efforts and pure strikes, was perfectly positioned to send a first-time volley dipping into the bottom corner from the edge of the box.
Carey was on the hunt for another just after the half hour mark when his free-kick from distance whistled towards goal. On this occasion the ball brushed the side netting.
Jamie Murphy, who has looked sharp since arriving, then went for glory as the break approached but his effort from a promising position was deflected behind.
There was still time for Ayr United to carve out a great chance when Sam Ashford suddenly found himself one-on-one, which Elliott Parish dealt with well and then Murphy couldn’t nod in a Wright cross.
Nobody on the end of dangerous deliveries was a theme across the first half. Wright had produced a couple of clever crosses but he was replaced at half-time. O’Halloran took his place.
Ayr United had the best sight of goal in the early second half exchanges but Dipo Akinyemi’s header from a corner was never in danger of defeating Parish.
Youngster Taylor Steven was sent on in the 61st minute for some fresh legs as May departed. He made a nice first impression by chasing down a long ball and forcing a save out of goalkeeper Aidan McAdams.
New signing Ryan McGowan was then handed his debut, replacing Andy Considine, while Max Kucheriavyi also came on for Carey.
Ayr had a terrific opportunity to level late in the day when Ashford burst clear. He had an option of feeding his team-mate to the left but decided to go for goal and blasted over.