Substitute Rudy Gestede's added-time equaliser rescued a draw for Cardiff and robbed Leicester City of victory.
The Frenchman headed past Kasper Schmeichel in the third minute of injury time in a breathless finish at the Cardiff City stadium.
Leicester had looked set to win after Michael Keane had headed them in front 18 minutes from time.
The result lifts Cardiff four points clear at the top of the Championship table, with a game in hand over Hull.
But this was a let-off for Malky Mackay's team, who again looked nervous and out of sorts.
And when Keane, on-loan from Manchester United, struck with a close-range header it looked as though Cardiff were slipping to their third defeat in five games.
But Gestede's direct style made the difference, although it was the Foxes who looked the more assured and dangerous side with Lloyd Dyer and David Nugent posing problems for the Bluebirds' defence.
Leicester will feel a little bit disappointed. There was plenty of effort, that is for sure. I felt that the home team lacked a little bit of confidence, a little bit of composure. Leicester deserved their lead and were probably quite surprised when Cardiff pulled that goal out of the blue right in the last seconds of the game
A further worry for Cardiff was another injury to captain Mark Hudson, who was making his first start after missing two games with an ankle problem.
Leicester boss Nigel Pearson gave a first league appearance of the season to Richie Wellens with Sean St Ledger replacing the injured Ritchie De Laet for his first start since October.
Cardiff goalkeeper David Marshall was tested early on when he could only parry Nugent's shot into the path of Dyer whose follow-up was blocked by Aron Gunnarsson.
And Dyer was instrumental in another promising move just before the interval with Andrew Taylor having to clear away for a corner as Leicester's top scorer Nugent closed in.
The Bluebirds appeared nervous after their recent run of poor form - their best chance in an unconvincing first-half display chance coming to nothing when Craig Noone and Fraizer Campbell got in each other's way.
Cardiff boss Mackay was clearly unimpressed with his team's attacking, sending on Craig Bellamy to replace Noone at the start of the second half.
His other change was enforced, however, with Kevin McNaughton replacing Hudson who had received treatment during the opening period.
Cardiff's greater attacking intent almost paid off when Bellamy's early ball freed Tommy Smith on the right, but his low cross was just missed by the diving Campbell.
Marshall had to come to Cardiff's rescue again when Nugent's ball released Chris Wood, but the Scottish international goalkeeper saved brilliantly.
The Foxes' reputation for finishing strongly was underlined as they surged forward and Keane headed Danny Drinkwater's corner onto the post.
The Manchester United loan man then made Cardiff pay for failing to clear their lines, heading in from close range from St Ledger's cross.
Leicester did not look troubled until the closing minutes and many home fans had already left the stadium when Gestede found the target to earn a point.
VIEW FROM THE DRESSING ROOM
Cardiff City manager Malky Mackay said: "It shows a great fighting spirit to press and keep pressing and keep knocking the door.
"We had a couple of chances just before that [equaliser] from [Peter] Whittingham and Fraizer Campbell, so to get the actual goal in the end is a hard-earned reward for that team tonight.
"It's about making sure that we just stay focussed on our task in hand, we've got to make sure that we only look at the team that's in front of us.
"Everyone else is in the same boat in terms of chasing, in terms of picking up points every week and knowing that wherever you go in the division there's tough games, and you saw that again tonight."
Leicester City manager Nigel Pearson said: "We deserved to win the game as we were much the better side.
"It was a bit cruel on the players bearing in mind how late it was. This is never an easy place to come to and a bit of confidence has been lacking. But I thought we played very well.
"We know that our points tally of late has not been good enough and we've fallen off the pace. I just feel for the players.
"I can't remember Cardiff really creating a chance until the goal. It was fatigue, but that happens. I'm not going to get too downbeat about it. You've got to work your way and show courage through difficult periods. The players did that."
- 01 Marshall
- 03 Taylor
- 05 Hudson (McNaughton - 46' )
- 12 Connolly
- 31 Nugent Booked
- 07 Whittingham
- 11 Conway (Gestede - 70' )
- 16 Noone Booked (Bellamy - 46' )
- 17 Gunnarsson
- 14 Smith
- 27 Campbell
- 32 Lewis
- 02 McNaughton
- 08 Cowie
- 13 Kim Bo-Kyung
- 15 Gestede
- 20 Mason
- 39 Bellamy
- 01 Schmeichel
- 05 Morgan
- 12 St Ledger Booked
- 15 M Keane Booked
- 04 Drinkwater
- 10 King
- 11 Dyer
- 19 Wellens (Kane - 63' )
- 18 Schlupp
- 35 Nugent Booked (Vardy - 81' )
- 39 Wood (Waghorn - 89' )
- 13 Logan
- 06 Whitbread
- 07 Marshall
- 24 Knockaert
- 09 Vardy
- 14 Waghorn
- 37 Kane
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +2:13
The assist for the goal came from Andrew Taylor.90:00 +2:13 Goal scored
Goal! - Rudy Gestede - Cardiff 1 - 1 Leicester Rudy Gestede finds the net with a headed goal from deep inside the penalty area. Cardiff 1-1 Leicester.90:00 +2:04
The ball is sent over by Andrew Taylor,90:00 +1:16
The assistant referee signals for offside against Martyn Waghorn. David Marshall takes the free kick.90:00 +0:22
Centre by Craig Bellamy, Rudy Gestede takes a shot. Save by Kasper Schmeichel.89:39
The ball is crossed by Kevin McNaughton. The ball is sent over by Craig Bellamy.87:50 Substitution
Substitution Martyn Waghorn joins the action as a substitute, replacing Chris Wood.87:50
Tommy Smith crosses the ball, Peter Whittingham produces a left-footed shot from just outside the penalty box that misses to the left of the target.87:13
A cross is delivered by Jamie Vardy, David Marshall makes a comfortable save.85:44
Matthew Connolly sends in a cross, Sean St. Ledger makes a clearance. Corner taken right-footed by Craig Bellamy from the left by-line, Kasper Schmeichel makes a comfortable save.82:54
The ball is sent over by Peter Whittingham, Header on goal by Ben Nugent from just inside the area goes over the goal.79:55
Free kick taken by Andrew Taylor.79:55 Substitution
Substitution Jamie Vardy is brought on as a substitute for David Nugent.79:55 Booking
Booking Michael Keane goes into the referee's book.79:31
Michael Keane concedes a free kick for a foul on Fraizer Campbell.76:19
The assistant referee signals for offside against Fraizer Campbell. Free kick taken by Kasper Schmeichel.74:51
Chris Wood takes a shot. David Marshall makes a comfortable save.74:11
Kevin McNaughton is caught offside. Kasper Schmeichel takes the free kick.73:45
The ball is delivered by Craig Bellamy, clearance by Andy King.
The ball is crossed by Chris Wood, Ben Nugent makes a clearance.72:51
Free kick awarded for an unfair challenge on David Nugent by Tommy Smith. Free kick taken by Kasper Schmeichel.71:09
The assist for the goal came from Sean St. Ledger.71:09 Goal scored
Goal! - Michael Keane - Cardiff 0 - 1 Leicester Michael Keane finds the back of the net with a headed goal from close range. Cardiff 0-1 Leicester.70:17
Corner taken by Danny Drinkwater played to the near post, Header from close in by Michael Keane hits the post.69:15 Substitution
Substitution Rudy Gestede joins the action as a substitute, replacing Craig Conway.67:51
The assistant referee flags for offside against Sean St. Ledger. Indirect free kick taken by David Marshall.65:50
Free kick crossed by Danny Drinkwater. Harry Kane takes a shot. Comfortable save by David Marshall.65:50 Booking
Booking The referee shows Ben Nugent a yellow card for unsporting behaviour.65:17
Unfair challenge on Harry Kane by Ben Nugent results in a free kick.62:35 Substitution
Substitution Richie Wellens leaves the field to be replaced by Harry Kane.62:35
Aron Gunnarsson sends in a cross.61:15
Chris Wood takes a shot. Save by David Marshall. Danny Drinkwater takes the outswinging corner, clearance made by Tommy Smith.57:00
The ball is swung over by Aron Gunnarsson, clearance by Andy King.56:08
Craig Bellamy takes the inswinging corner, Michael Keane manages to make a clearance.55:51
Corner taken left-footed by Peter Whittingham from the right by-line, save by Kasper Schmeichel.55:13
The ball is delivered by Tommy Smith, Sean St. Ledger manages to make a clearance. Corner taken by Craig Bellamy, Jeff Schlupp makes a clearance.54:09
Foul by Fraizer Campbell on Kasper Schmeichel, free kick awarded. Kasper Schmeichel takes the direct free kick.52:48
Fraizer Campbell crosses the ball.51:38
The ball is delivered by Richie Wellens, Kevin McNaughton manages to make a clearance. Outswinging corner taken right-footed by Danny Drinkwater from the right by-line.48:26
The ball is delivered by Lloyd Dyer, Effort from deep inside the area by David Nugent misses to the right of the goal.46:45
Sean St. Ledger crosses the ball, clearance made by Kevin McNaughton.45:01
The referee gets the second half started.45:01 Substitution
Substitution Kevin McNaughton joins the action as a substitute, replacing Mark Hudson.45:01 Substitution
Substitution Craig Bellamy joins the action as a substitute, replacing Craig Noone.45:00 +2:25 Half time
Half Time The match has reached half-time.45:00 +1:36
Centre by Lloyd Dyer, Andrew Taylor makes a clearance. Corner taken right-footed by Danny Drinkwater from the right by-line, Fraizer Campbell makes a clearance.43:31
Lloyd Dyer produces a cross, save made by David Marshall.42:36
The ball is delivered by Andrew Taylor, Jeff Schlupp manages to make a clearance.38:30
Inswinging corner taken right-footed by Danny Drinkwater, free kick awarded for a foul by Sean St. Ledger on Fraizer Campbell. Free kick taken by David Marshall.37:29
A cross is delivered by Lloyd Dyer, Andrew Taylor makes a clearance. Jeff Schlupp delivers the ball, clearance by Mark Hudson.34:51
Foul by Wes Morgan on Fraizer Campbell, free kick awarded. Mark Hudson takes the free kick.34:00
Free kick awarded for an unfair challenge on Chris Wood by Ben Nugent. Direct free kick taken by Danny Drinkwater.33:43
Craig Conway crosses the ball.28:47
Foul by Richie Wellens on Andrew Taylor, free kick awarded. Direct free kick taken by Andrew Taylor.27:54
The ball is crossed by Danny Drinkwater.26:37
Direct free kick taken by Kasper Schmeichel.26:37 Booking
Booking Caution for Craig Noone.26:20
Free kick awarded for a foul by Craig Noone on Sean St. Ledger.24:36
Andrew Taylor fouled by David Nugent, the ref awards a free kick. David Marshall takes the free kick.23:11
Foul by Jeff Schlupp on Fraizer Campbell, free kick awarded. Free kick crossed left-footed by Peter Whittingham from right wing, save made by Kasper Schmeichel. Tommy Smith produces a right-footed shot from just outside the penalty area that goes harmlessly over the target.22:37
Foul by David Nugent on Ben Nugent, free kick awarded. Free kick taken by David Marshall.20:24
The ball is swung over by David Nugent.20:00
Free kick awarded for a foul by Lloyd Dyer on Tommy Smith. Matthew Connolly restarts play with the free kick.19:08
Free kick crossed by Peter Whittingham, Wes Morgan makes a clearance.19:08 Booking
Booking Sean St. Ledger shown a yellow card.18:52
Free kick awarded for a foul by Sean St. Ledger on Craig Conway.17:51
Ben Nugent takes a shot. Comfortable save by Kasper Schmeichel.16:20
The ball is swung over by Jeff Schlupp, save by David Marshall.12:57
Craig Conway takes a inswinging corner to the near post, clearance by Danny Drinkwater.11:51
Chris Wood concedes a free kick for a foul on Craig Noone. Peter Whittingham delivers the ball from the free kick left-footed from right wing, Kasper Schmeichel makes a comfortable save.11:29
Peter Whittingham produces a cross.10:55
Peter Whittingham takes the direct free kick.10:55 Booking
Booking David Nugent shown a yellow card.10:36
David Nugent challenges Craig Conway unfairly and gives away a free kick.9:46
Chris Wood takes a shot. David Marshall makes a save. Lloyd Dyer takes a shot. Blocked by Matthew Connolly. David Nugent produces a cross, Matthew Connolly makes a clearance.8:52
Aron Gunnarsson takes a shot. Wes Morgan gets a block in.8:00
Lloyd Dyer sends in a cross, clearance by Andrew Taylor.6:37
Aron Gunnarsson crosses the ball, clearance by Sean St. Ledger.5:19
Craig Noone concedes a free kick for a foul on Danny Drinkwater. Richie Wellens restarts play with the free kick.3:22
Free kick awarded for an unfair challenge on Danny Drinkwater by Craig Conway. Wes Morgan takes the free kick.2:27
Handball decision goes against Craig Conway. Kasper Schmeichel takes the direct free kick.0:00
The ref blows the whistle to begin the match.
Live data and text provided by our data suppliers