Leeds escaped another shock FA Cup third-round defeat at Cardiff City as Sonny Perkins came on to score an added-time equaliser.
Cardiff, 20th in the Championship and the league's lowest scorers, struck twice in seven first-half minutes with goals by Jaden Philogene and Sheyi Ojo.
Booed off at half-time, Leeds replied well as substitute Rodrigo headed in.
Cardiff's Joel Bagan was sent off for handball but Rodrigo saw his resultant penalty saved by Jak Alnwick.
Then, just as the home side looked like holding on for another famous victory over Leeds - 21 years after doing so at the same stage over the then-Premier League leaders - Perkins scored from close range to break Cardiff's late resistance.
Boreham Wood or Accrington Stanley await Cardiff or Leeds in the 4th round after a cruel end to the game for the Bluebirds, who looked set for a first victory in eight games, which would have offered respite from their league struggles.
As for Leeds, Perkins' late leveller is a lifeline for manager Jesse Marsch, whose side have now gone six matches without a win in all competitions. A defeat here would have severely increased the pressure on the American.
This fixture invoked memories of then third-tier Cardiff's 2002 FA Cup triumph over an expensively-assembled Leeds side who were top of the Premier League at the time.
Since that landmark result, Cardiff had won 14 of the 22 subsequent meetings between the sides but, given their struggles in the Championship this season, confidence was in short supply in the Welsh capital.
Leeds were on a winless run of their own - five matches in all competitions - and also of concern for Marsch's men was their recent wretched FA Cup record, losing at the third-round stage in each of the past five seasons, including shock defeats by Newport County and Crawley Town.
Marsch said he had spoken with chief executive Angus Kinnear about the subject, and Leeds fans clearly fancied a cup run, selling out their allocation of 6,000 and creating a din which drowned out the home crowd for long periods.
The Leeds players looked similarly motivated as they controlled the opening exchanges, Darko Gyabi impressing in midfield with an early shot going narrowly wide and a weaving run which ended with an effort well blocked by Jack Simpson.
But despite the visitors' early control, it was Cardiff who took the lead against the run of play. Tom Sang freed Mark Harris with a fine through-ball and, after his shot was saved by Joel Robles, Harris teed up Isaak Davies. His shot was also blocked but the ball fell to Philogene, who fired in from close range.
Having scored a mere 20 goals in 26 league games this season, the Championship's lowest scorers made it two in seven minutes against their Premier League opponents.
The second was an altogether classier affair, with Andy Rinomhota's delightful lofted pass glancing the head of Leeds centre-back Diego Llorente before reaching Ojo, who chested the ball before finishing smartly on the turn.
Leeds were booed off at half-time and their fans' ire had the desired effect after the restart as their team put Cardiff under constant pressure with a flurry of chances.
First, Pascal Struijk headed inches wide before top scorer Rodrigo, recently on as a substitute, rose to meet Sam Greenwood's cross and head into the net despite a touch from Alnwick.
Rodrigo fired another shot over before playing a leading role in one of the game's decisive moments.
The penalty was as blatant as they come - Bagan diving like a goalkeeper to push Junior Firpo's goal-bound shot away with his hand - but Rodrigo's weak spot-kick was saved by Alnwick.
Cardiff fans celebrated the save with newfound belief that their side were about to claim another FA Cup scalp but it was Leeds' noisy travelling contingent who had the last laugh as Perkins helped Firpo's flick into the net to spark wild celebrations behind that goal and force a replay.
FA Cup Third Round
Cardiff City 2 (Philogene 25’, Ojo 31’)
Leeds United 2 (Rodrigo 65’, Perkins 90’)
Cardiff: Alnwick (GK), Sang, Nelson, Simpson, Bagan, Rinomhota, Sawyers (Wintle 77’), Ojo (Ralls 86’), Philogene (O’Dowda 77’), Harris (NG 86’), Davies (Tanner 63’). Subs not used: Allsop (GK), L. Benjamin, Nkounkou, Wigley.
Leeds: Robles (GK), Firpo, Aaronson (Perkins 86’), Summerville (Rodrigo 59’), Llorente, Gyabi (Wober 59’), Struijk (C), Kristensen (Drameh 59’), Gnonto, Gelhardt (Joseph 73’), Greenwood. Subs not used: Klaesson (GK), Ayling, Roca, Harrison.
Venue: Cardiff City Stadium
Referee: Jarred Gillett
Booked: Sang, Bagan (Cardiff) Gnonto, Struijk, Greenwood (Leeds)
Sent-off: Bagan (Cardiff)