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.
David PleatFootball Analyst
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."
Full Time The referee blows his whistle to end the game.
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.
The ball is sent over by Andrew Taylor,
The assistant referee signals for offside against Martyn Waghorn. David Marshall takes the free kick.
Centre by Craig Bellamy, Rudy Gestede takes a shot. Save by Kasper Schmeichel.
The ball is crossed by Kevin McNaughton. The ball is sent over by Craig Bellamy.
Substitution Martyn Waghorn joins the action as a substitute, replacing Chris Wood.
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.
A cross is delivered by Jamie Vardy, David Marshall makes a comfortable save.
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.
The ball is sent over by Peter Whittingham, Header on goal by Ben Nugent from just inside the area goes over the goal.
Free kick taken by Andrew Taylor.
Substitution Jamie Vardy is brought on as a substitute for David Nugent.
Booking Michael Keane goes into the referee's book.
Michael Keane concedes a free kick for a foul on Fraizer Campbell.
The assistant referee signals for offside against Fraizer Campbell. Free kick taken by Kasper Schmeichel.
Chris Wood takes a shot. David Marshall makes a comfortable save.
Kevin McNaughton is caught offside. Kasper Schmeichel takes the free kick.
The ball is delivered by Craig Bellamy, clearance by Andy King.
The ball is crossed by Chris Wood, Ben Nugent makes a clearance.
Free kick awarded for an unfair challenge on David Nugent by Tommy Smith. Free kick taken by Kasper Schmeichel.
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.
Corner taken by Danny Drinkwater played to the near post, Header from close in by Michael Keane hits the post.
Substitution Rudy Gestede joins the action as a substitute, replacing Craig Conway.
The assistant referee flags for offside against Sean St. Ledger. Indirect free kick taken by David Marshall.
Free kick crossed by Danny Drinkwater. Harry Kane takes a shot. Comfortable save by David Marshall.
Booking The referee shows Ben Nugent a yellow card for unsporting behaviour.
Unfair challenge on Harry Kane by Ben Nugent results in a free kick.
Substitution Richie Wellens leaves the field to be replaced by Harry Kane.
Aron Gunnarsson sends in a cross.
Chris Wood takes a shot. Save by David Marshall. Danny Drinkwater takes the outswinging corner, clearance made by Tommy Smith.
The ball is swung over by Aron Gunnarsson, clearance by Andy King.
Craig Bellamy takes the inswinging corner, Michael Keane manages to make a clearance.
Corner taken left-footed by Peter Whittingham from the right by-line, save by Kasper Schmeichel.
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.
Foul by Fraizer Campbell on Kasper Schmeichel, free kick awarded. Kasper Schmeichel takes the direct free kick.
Fraizer Campbell crosses the ball.
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.
The ball is delivered by Lloyd Dyer, Effort from deep inside the area by David Nugent misses to the right of the goal.
Sean St. Ledger crosses the ball, clearance made by Kevin McNaughton.
The referee gets the second half started.
Substitution Kevin McNaughton joins the action as a substitute, replacing Mark Hudson.
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.
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.
Lloyd Dyer produces a cross, save made by David Marshall.
The ball is delivered by Andrew Taylor, Jeff Schlupp manages to make a clearance.
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.
A cross is delivered by Lloyd Dyer, Andrew Taylor makes a clearance. Jeff Schlupp delivers the ball, clearance by Mark Hudson.
Foul by Wes Morgan on Fraizer Campbell, free kick awarded. Mark Hudson takes the free kick.
Free kick awarded for an unfair challenge on Chris Wood by Ben Nugent. Direct free kick taken by Danny Drinkwater.
Craig Conway crosses the ball.
Foul by Richie Wellens on Andrew Taylor, free kick awarded. Direct free kick taken by Andrew Taylor.
The ball is crossed by Danny Drinkwater.
Direct free kick taken by Kasper Schmeichel.
Booking Caution for Craig Noone.
Free kick awarded for a foul by Craig Noone on Sean St. Ledger.
Andrew Taylor fouled by David Nugent, the ref awards a free kick. David Marshall takes the free kick.
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.
Foul by David Nugent on Ben Nugent, free kick awarded. Free kick taken by David Marshall.
The ball is swung over by David Nugent.
Free kick awarded for a foul by Lloyd Dyer on Tommy Smith. Matthew Connolly restarts play with the free kick.
Free kick crossed by Peter Whittingham, Wes Morgan makes a clearance.
Booking Sean St. Ledger shown a yellow card.
Free kick awarded for a foul by Sean St. Ledger on Craig Conway.
Ben Nugent takes a shot. Comfortable save by Kasper Schmeichel.
The ball is swung over by Jeff Schlupp, save by David Marshall.
Craig Conway takes a inswinging corner to the near post, clearance by Danny Drinkwater.
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.
Peter Whittingham produces a cross.
Peter Whittingham takes the direct free kick.
Booking David Nugent shown a yellow card.
David Nugent challenges Craig Conway unfairly and gives away a free kick.
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.
Aron Gunnarsson takes a shot. Wes Morgan gets a block in.
Lloyd Dyer sends in a cross, clearance by Andrew Taylor.
Aron Gunnarsson crosses the ball, clearance by Sean St. Ledger.
Craig Noone concedes a free kick for a foul on Danny Drinkwater. Richie Wellens restarts play with the free kick.
Free kick awarded for an unfair challenge on Danny Drinkwater by Craig Conway. Wes Morgan takes the free kick.
Handball decision goes against Craig Conway. Kasper Schmeichel takes the direct free kick.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.