Dunfermline 1-1 Rangers
David Grondin celebrates the opening goal
Dunfermline deservedly earned a Scottish Cup quarter-final replay after a battling performance against holders Rangers.
The home side shocked Rangers by taking the lead midway through the first half with a fine strike by David Grondin, his first for the club, but Rangers struck back quickly through Claudio Caniggia.
Both sides had chances to win the game, but Derek Stillie in the Dunfermline goal was in particularly inspired form.
Barry Ferguson was sent off a couple of minutes before the end after a bad tackle on Noel Hunt, to epitomise Rangers' frustration after a difficult game.
It was Stefan Klos in the Rangers goal who tasted action first, diving to his left to gather Gary Mason's third minute effort.
Rangers' first effort on goal did not come until the 13th minute when
Neil McCann got on the end of Caniggia's cross from the right, but his header was wide of target.
Ged Brannan saved Dunfermline with a brilliant tackle on Mikel Arteta as he prepared to let fly after being picked out by Caniggia.
But with 23 minutes gone, Dunfermline took the lead when Rangers failed to clear their lines effectively, allowing Craig Brewster to collect the ball - albeit in a seemingly offside position.
With play allowed to continue, Brewster laid it into the path of Grondin who lashed a left-foot drive past Klos.
But Rangers were behind for only eight minutes. Ronald de Boer spun away from Gus MacPherson and released Caniggia, who tucked the ball beyond the outrushing Derek Stillie.
Stevie Crawford almost regained the lead for the home side seven minutes before the break when he cut inside Kevin Muscat to fire in a powerful shot from a tight angle, but the ball flew just wide of the far post.
Claudio Caniggia celebrates his goal
Stillie denied Rangers with two fine saves on the stroke of half time, firstly from a close-range De Boer header and then a powerful Kevin Muscat shot.
Klos then kept the scores level as Crawford broke free only for the German keeper to save at his feet.
Rangers had to wait until midway through the second period for the first real opportunity of the half - Caniggia getting on the end of McCann's cross only for Chris McGroarty to get in a saving block almost on the line.
Moments later, McCann picked out De Boer at the back post, but the Dutchman's header was just off target.
Stillie saved Dunfermline again with 15 minutes left, diving to push Ferguson's drive away.
Caniggia missed a gilt-edged chance five minutes later, mis-judging his header after Arteta had picked him out at the back post.
Shota Arveladze missed an even easier opportunity when Bert Konterman's header fell to him four yards out, but somehow the Georgian directed the ball over the bar.
Then Arteta had a claim for a penalty waved away as he went down in dramatic fashion under Brannan's challenge.
With just over a minute remaining, Ferguson was red-carded for a bad challenge on Hunt, who had been on the receiving end of a number of heavy tackles.
From the resulting free kick, Klos flapped at the ball but the Rangers defence managed to clear.
Dunfermline: Stillie, MacPherson, Scott Wilson, McGarty,
Nicholson (Hunt 52), Mason, Brannan, McGroarty,
Grondin (Kilgannon 74), Crawford, Brewster.
Subs Not Used: Ruitenbeek, Dair, Walker.
Booked: Hunt, Brannan.
Rangers: Klos, Moore, Konterman, Muscat, Ricksen, Ferguson,
Arteta, McCann (Arveladze 74), Caniggia, De Boer, Malcolm.
Subs Not Used: McGregor, Thompson, Ross, Eggen.
Sent Off: Ferguson (89).
Booked: Ricksen, Muscat, Malcolm, Moore.
Ref: J Underhill