Rangers' passage to the Coca-Cola Cup final proved untroubled and convincing in the end, but the Scottish champions had first to extinguish the fire of a lively Dunfermline side before a second-half scoring burst saw them qualify for a meeting with Hearts or Dundee.
They also overcame the unreal atmosphere of Celtic Park, at less than half its capacity as supporters of both sides opted for the convenience of live television coverage.
Dunfermline were fired by the belief that this could be their night, reasoning that Rangers would be less effective given their lengthy injury list. Another factor, no doubt, was the chance to avenge a 5-2 defeat by Rangers on the opening day of the season.
Their route one tactic may not have been pretty but here is a side that plays to their strength, with the pace of Allan Moore and Stewart Petrie on the flanks allied to the enthusiasm of Andy Smith ensuring that the Rangers defence would be kept busy.
The ferocity of the Dunfermline attack gave Rangers' back three an uncomfortable opening, with Smith heading wide from an early corner then Marc Millar forcing Theo Snelders to make a fine save from his long-range shot. However, one clinical piece of finishing put Rangers ahead at the interval. Jorg Albertz picked out Brian Laudrup, who had made a blind side run, allowing the quick-footed Dane to round the goalkeeper to score. Within seconds Snelders again reacted well to deny Petrie.
Rangers attempted to put the tie beyond their opponents from the restart with Andersen given a clear run on the Dunfermline goalkeeper, but the forward's shot was deflected wide. David Robertson, playing his first competitive match of the season, then saw his cross come back off a post before Derek McInnes scored the second.
A cross from the right was headed back to the edge of the penalty area by Paul Gascoigne for McInnes to score with the aid of a deflection. Dunfermline pulled a goal back four minutes later when a Smith shot came off Snelders for Moore to shoot the rebound into the empty net.
However, two goals in as many minutes settled the tie for Rangers, both scored by Andersen. In the 62nd minute he restored his side's two goal advantage by finishing off a McInnes shot, then the Dane shrugged off a tackle to shoot high into the net for Rangers' fourth. Laudrup added a fifth in the 69th minute and a sixth goal from Albertz seven minutes underlined Rangers' potency in attack.
Gascoigne, who was taunted by Dunfermline fans with chants of "What's it like to beat your wife", admitted he was still feeling the pressure following his recent problems. "It's still bad really, but I have got to get on with it," he said. "I was very nervous at the start of the game.
"I've got to sort out my problems and to concentrate on playing for Rangers. The fans have been great and I've just got to concentrate, on and off the field."
Dunfermline (3-4-3): Lemajic; Miller, Clark, Tod; Den Biemam, Robertson, French, Millar (Fleming, 64); Moore, Smith (Britton, 69), Petrie. Substitute not used: Westwater.
Rangers (3-5-2): Snelders; Petric, Gough, Bjorklund; Cleland, McInnes, Gascoigne, Albertz, Robertson (Shields, 70); Andersen, Laudrup (Durrant, 70). Substitute not used: Moore.
Referee: J McCluskey (Stewarton).