Ben Thompson struck a last-minute leveller as Millwall and Rochdale drew 2-2 in the Emirates FA Cup Fourth Round at The Den on Saturday afternoon.
Jed Wallace's penalty-kick set The Lions on their way in the first-half, but goals from Ian Henderson and Matt Done swung the tie on its head.
Thompson, however, popped up with seconds of the 90 minutes remaining to ensure both sides will meet again in a replay at Spotland for a place in Round Five.
Neil Harris made nine changes from last Saturday's ding-dong 4-3 victory at Leeds United, with only Jake Cooper and Wallace surviving. Meanwhile, Jason Shackell made his debut after signing for the club on Thursday morning.
The first opportunity of the afternoon came on five minutes as Shane Ferguson picked the ball up in his own half and charged towards the penalty area, but the Northern Irishman dragged his shot well wide.
A goalmouth scramble could have lead to Dale taking the lead minutes later, but the danger was averted by The Lions' defence. Tony Craig - on his 300th start for Millwall - and Ben Thompson stood firm to long-range shots, before the home side were awarded a penalty with 16 minutes on the clock as Donervon Daniels cynically brought down Fred Onyedinma.
Wallace stepped and fired home, despite goalkeeper Josh Lillis getting a hand to the ball.
The lead could have been doubled a couple of minutes after, but some last-ditch Rochdale defending prevented Tom Elliott and Onyedinma from scoring.
With half-hour on the clock, new signing Shackell was called into defensive action to brilliantly stop Mark Kitching getting a shot away, but just seconds later, Dale were level as Henderson curled past David Martin.
Ferguson - who showed outrageous skill earlier in the first-half to double-nutmeg two Rochdale players - nearly caught out Lills with a corner-kick on 38 minutes, but the wind-assisted ball sailed just wide.
The visitors began the second-half on top and nearly found a route to goal twice through Kitching, but Martin and Millwall's back-line was equal to his efforts.
Andy Cannon tested the stopper on 51 minutes as Dale upped the ante, but once more the former MK Dons man was equal to the attempt.
On 53 minutes, Rochdale got their reward as Done tapped home on the goal-line after a cross was deflected into his path.
Elliott forced a save out of Lillis as The Lions looked to level, whilst at the other end it looked as though Cannon's deflected effort would sneak into the corner - Martin, however, had just had enough time to scramble across and grab the ball.
With 63 minutes on the clock Onyedinma found Elliott with a pin-point cross, but the striker's header sailed over the crossbar. Cannon cannoned the ball off Martin at the other end seconds later as Dale looked to seal the victory - fortunately, the ball bounced away to safety.
Elliott again found himself on the end of a cross - this time a whipped-in ball from Ferguson - but the striker's header was plucked out of the air by Lillis.
The Lions begun to pepper the Rochdale penalty area with crosses as the last 15 minutes got underway, but they were unable to find the equaliser. Elliott once more directed a header off-target from Wallace's cross with eight minutes remaining.
More silky skills from Ferguson allowed the winger to dart a cross in on 83 minutes, but no Millwall man was there to turn the ball home. From yet another ball into the box seconds later, Cooper headed wide.
Elliott's shot was deflected behind for a corner-kick and Cooper once more headed off target as the game came to a conclusion, but The Lions were rescued as the clock struck 90 minutes as Thompson slotted home from inside the penalty area.
Millwall: Martin, Craig, Thompson, Onyedinma (Gregory 85'), Ferguson, Romeo, Wallace, Tunnicliffe (Williams 84'), Elliott, Shackell (Morison 59'), Cooper. Subs not used: Archer, McLaughlin, Meredith, Saville.
Scorer: Wallace 17' pen, Thompson 90'
Rochdale: Lillis, Rafferty, McNulty, Andrew, Camps (Adshead 51'), Done, Delaney, Cannon (Rathbone 80'), Daniels, Kitching, Henderson. Subs not used: Ntlhe, McGahey, Thompson, Moore, Inman.
Scorer: Henderson 31', Done 53'
Booking: Camps, Andrew
Referee: Andrew Madley
Attendance: 8,346 (485)