Dennis Wyness' late header was enough for Peterhead to eke out a 1-0 win over Berwick in their Co-operative Insurance Cup first-round tie at Balmoor.
The game started tentatively with neither side in control, although Graeme Sharp drove over the bar for Peterhead early on.
Berwick struggled to gain a foothold and the hosts soon started carving out more openings with Paul Emslie and Martin Bavidge going close.
But Jimmy Crease's side came out fighting after the restart and David Greenhill's long-range effort nearly earned Berwick a shock lead.
Soon after, a tidy move down the right hand side saw Fraser McLaren's goalbound header well saved by Blue Toon keeper Paul Jarvie.
But Berwick were left broken-hearted as striker Wyness rose highest to meet Martin Bavidge's centre in the 82nd minute to give Peterhead victory.