In the end the Championship side won 7-0 with two goals each for Mike Moffat, Luke McCowan and Kris Doolan (pictured inset) and a strike from Craig McGuffie.
Berwick enjoyed good early possession, but the first real chance fell to Ayr after six minutes when a Craig McGuffie shot brought out a full-length save from Sean Brennan.
From the resulting corner, Cammy Lumsden headed off the Rangers’ goal line.
The breakthrough came after 21 minutes when Ayr played the ball out from their own penalty area and, three passes later, Mike Moffat coolly slotted past Brennan in the home goal.
On 26 minutes, Ayr went close to adding a second when McGuffie crossed for Kris Doolan, whose close-range header was acrobatically tipped over by Brennan.
But less than 60 seconds later, Luke McCowan fired in a low shot which nestled in the bottom corner to double the visitors’ advantage.
McCowan then fired straight at Brennan as Ayr threatened again, whilethe wide man made another run, culminating in a Moffat shot straight at the Berwick keeper.
Two goals in a minute then put Ayr in easy street.
On 35 minutes, Ayr added a third with a simple cushioned header from Kris Doolan, following a cross by McGuffie on the left.
Just a minute later, it was 0-4 when Moffat netted from close range and, on 42 minutes, McGuffie took advantage of a poor defensive clearance to break forward and stroke home a fifth.
Early in the second half, Berwick created arguably their best chance when Daryl Healy crossed from the left but Ali Forster, under pressure, was unable to get his shot away.
Substitute Grant Rose, on at the start of the second half, headed wide and then blasted wide after 58 minutes as Rangers tried to salvage some pride.
Brennan made a point blank save to deny Doolan, but just a minute later, after 70 minutes, McCowan made it six of the best for Ayr, netting his second of the game with a close range finish.
On 86 minutes, Ayr added a seventh when David Ferguson broke down the right and crossed for Doolan to force in his second from close range.
Late in the game, substitute Dan Purves had a half-chance for Berwick but scooped his effort over the bar under pressure from a defender.
Berwick: Brennan, Wright (Rose 46), Forster, Waugh, Cook, E. Smith, Lumsden, A. Smith, Healy (Jack 83), Barr, Windram (Purves 83).
Ayr: Doohan, Muirhead, Harvie, Kerr, Roscoe, Geggan (Ferguson 61), Moffat (Ross 67), Doolan, McCowan, McGuffie (Forrest 71), Kelly.
Referee: Scott Lambie.
Berwick Rangers continue their Group G Betfred Cup campaign in match two at Stranraer this Saturday, kick-off 3pm.