Dunfermline dodged the banana skin of which chairman John Yorkston had warned but only just.
The SPL new boys went into this Communities League Cup clash as overwhelming favourites against a third division side that had never come up against top-flight opposition.
While the margin of victory might have been greater had the Pars taken their chances, Annan made their visitors fight all the way.
Their spirit was never more evident than when, having conceded an opener to Andy Barrowman’s 18th minute strike, they hit back just three minutes later through a wonderful shot from David Cox.
Sean O’Connor and Ian Harty then squandered chances to put the underdogs ahead before Andy Kirk’s header early in the second half proved the winner.
After such a tight encounter it was little wonder that Pars boss Jim McIntyre had words of praise for the men who made the difference his two goal scorers.
Indeed, it was a significant day for Barrowman who netted his first goal since joining from Ross County.
McIntyre said, “It was important for Andy to get off the mark and he took his goal extremely well.
“Strikers take confidence from goals, so it was also good that Andy Kirk scored and hopefully the two of them will build on this.”
Kirk had already hit the bar when Barrowman notched the opener with a firm header from Joe Cardle’s cross, but Annan hit back immediately through Cox’s firm left-foot shot.
The decisive moment came six minutes after the break when Austin McCann sent over a teasing cross and Kirk rose to head in the winner.
The Pars survived an anxious moment when Bryan Gilfillan went close to equalising but there was to be no fairy tale for the Galabank side.
McIntyre added, “We could have been three or four goals up in the first half but we never put the chances away.
“Credit to Annan for hitting back, and we then got involved in a bit of a scrap rather than getting the ball down and playing, but we spoke about that at half-time and after that we passed the ball much better.”