David Clarkson and Lloyd Dyer each grabbed a goal in injury time as Bristol City and Leicester were forced to share the spoils at Ashton Gate.
The result was harshest on Leicester, who had hit a post with a Matt Oakley shot after Paul Gallagher had earlier missed an open net with a header.
Still, the Foxes had to rely on Dyer's last-gasp equaliser after Clarkson had fired in from Chris Iwelumo's pass.
Michael Morrison created the leveller, laying in for Dyer to smash home.
Bristol City boss Gary Johnson: "I'm going back in there to have another word with the players because I don't want them leaving the ground dejected.
"They gave everything and our supporters were magnificent in getting behind them. As the game went on, we looked the more likely winners, having had some luck earlier on.
"We'll have to look at the technical side of conceding another late goal. But the performance was one to build on against West Bromwich Albion on Sunday.
"We created chances in the second half and it's not often our fans applaud us off after a home draw."
Leicester boss Nigel Pearson: "It would have been a travesty if we had lost that game.
"We could have been two goals up at half-time and, even though Bristol showed more in the second half, we certainly didn't deserve to lose.
"We wasted chances and we felt there was a push on Richie Wellens in the build-up to their goal.
"The results mean we are still in with a play-off shout and the top six remains a realistic aim for us."
90:00+6:33 The referee blows for the end of the match.
90:00+6:07 David Clarkson takes a shot. Save by Chris Weale.
90:00+5:01 Foul by Marvin Elliott on Yann Kermorgant, free kick awarded. Direct free kick taken by Bruno Berner.
90:00+4:36 Liam Fontaine produces a right-footed shot from deep inside the penalty box which goes wide of the right-hand upright.
90:00+3:39 Yann Kermorgant takes a shot. Save by Dean Gerken.
90:00+3:02 Outswinging corner taken right-footed by Nicky Adams from the right by-line to the near post.
90:00+1:29 The assist for the goal came from Michael Morrison.
90:00+1:29 GOAL - Lloyd Dyer:Bristol City 1 - 1 Leicester Goal scored by Lloyd Dyer from inside the penalty box to the bottom right corner of the goal. Bristol City 1-1 Leicester.
90:00+0:17 The assist for the goal came from Chris Iwelumo.
90:00+0:17 GOAL - David Clarkson:Bristol City 1 - 0 Leicester David Clarkson finds the net with a goal from inside the penalty area to the bottom left corner of the goal. Bristol City 1-0 Leicester.
89:46 Ivan Sproule takes a shot. Save made by Chris Weale.
89:21 Yann Kermorgant challenges Marvin Elliott unfairly and gives away a free kick. Direct free kick taken by Marvin Elliott.
88:02 Free kick awarded for an unfair challenge on Richie Wellens by Ivan Sproule. Direct free kick taken by Jack Hobbs.
86:43 Substitution Dany N'Guessan on for Paul Gallagher.
84:10 Corner from the right by-line taken by Lee Johnson, clearance made by Michael Morrison.
83:59 Ivan Sproule takes a shot. Blocked by Bruno Berner.
82:43 Effort on goal by Andy King from just inside the box goes harmlessly over the target.
81:55 Outswinging corner taken by David Clarkson from the right by-line.
81:40 David Clarkson takes a shot. Save made by Chris Weale.
80:38 Corner taken right-footed by David Clarkson from the right by-line to the near post, clearance by Bruno Berner.
80:24 The ball is swung over by Chris Iwelumo, Bruno Berner gets a block in.
78:47 Andy King fouled by Marvin Elliott, the ref awards a free kick. Chris Weale restarts play with the free kick.
76:57 David Clarkson produces a right-footed shot from deep inside the penalty box which goes wide of the right-hand upright.
76:37 The ball is sent over by Nicky Maynard, Lee Johnson takes a shot. Blocked by Wayne Brown.
72:35 Substitution (Bristol City) makes a substitution, with Nicky Maynard coming on for Danny Haynes.
72:16 Substitution Nicky Adams comes on in place of Matt Oakley.
Bookmark with:
What are these?