Ayr United overcame Queen of the South in extra time to progress to the second round of the Ramsdens Cup.
Queens goalkeeper Roddy McKenzie made saves to deny Michael Moffat and Gareth Wardlaw in the first half.
Daniel Carmichael's shot was blocked by Ayr keeper Keith Cuthbert on 65 minutes and extra time ensued.
Martyn Campbell's strike put Ayr ahead on 94 minutes and Andrew Geggan headed a second five minutes from the end to send the hosts through.
Ayr: Cuthbert, John Robertson, Malone, Smith, Campbell, Burke (Tiffoney 68),Trouten, Geggan, Moffat (Ross Robertson 113), Wardlaw (Roberts 63),McGowan. Subs Not Used: McWilliams, Armstrong.
Goals: Campbell 94,Geggan 115.
Queen of South: McKenzie,Craig Reid (Alan Reid 91),Higgins, McKenna,Campbell,McGuffie,Johnston (Carmichael 65),Simmons, Smith (Clark 76),Brighton,McLaughlin. Subs Not Used: Atkinson, McShane.
Ref: Brian Winter