Nottingham Forest were beaten 3-2 by Leicester City on a frantic afternoon at The City Ground.
Anthony Knockaert struck the crucial blow late on as both sides sought the win they needed to reach the top six.
Forest had taken an early lead through Simon Cox but found themselves 2-1 down at the break courtesy of goals from Matty James and Andy King.
Elliott Ward levelled shortly after the break to set up the grandstand finale.
Billy Davies made two changes to the side which beat Millwall last weekend. Chris Cohen recovered from a thigh injury in time to take Radi Majewski’s place in midfield and Darius Henderson returned from suspension to replace Billy Sharp. Dan Harding kept his place at left back after an impressive performance at The Den.
Forest went close within the opening two minutes. Ritchie De Laet bundled Andy Reid over just outside the ‘D’. The Irishman picked himself up and curled his effort just over the the bar.
And The Reds had the lead a minute later. Wes Morgan, returning to The City Ground for the first time since signing for The Foxes, scuffed his clearance out for a throw. The ball was whipped in and Cox, whose last Forest goal came against Leicester in November, turned home at the back post to spark early scenes of jubilation.
Kasper Schmeichel denied him a second goal in as many minutes by reacting quickly to Henderson’s knock down in the area, before Knockaert claimed the first shot for the visitors by curling wide of Karl Darlow’s far post from the edge of the area.
Leicester then stepped up their chase for an equaliser. Lloyd Dyer won a corner off Greg Halford and, after the ball fell on the edge of the area, James saw his effort headed behind by Danny Collins.
The skipper stooped to head clear the next delivery, and from the resultant throw Knockaert skimmed the bar from similar range to his earlier effort.
David Nugent was next to go close. Forest failed to clear the ball in their own half and it eventually found its way to the experienced front man. He let the ball bounce, controlled and saw his right-footed effort superbly palmed away by Darlow.
But it was only to be a temporary reprieve as Leicester had a leveller on 23 minutes.
Dyer’s low effort looked like it may have been heading for the bottom corner before Collins slid in to turn the ball behind.
James’ quickly-taken corner then took The Reds by surprise and the ex-Manchester United midfielder reclaimed possession on the edge of the area and watched his heavily-deflected effort sail beyond a helpless Darlow and into the net.
Forest offered a response four minutes later. Lansbury and Adlene Guedioura exchanged passes before Lansbury’s 20-yard drive was tipped away by Schmeichel.
But it wasn’t long before The Foxes again looked menacing at the other end.
Dyer and Nugent linked up brilliantly in the area before the former Portsmouth man curled his shot high and wide when perfectly placed.
James then saw another shot deflect towards goal. It was straight at Darlow and, after the ‘keeper had punched it away, Nugent flashed his header from the resultant cross wide to waste a golden opportunity.
Forest were then forced into a change. Greg Halford was accompanied straight down the tunnel by the physio after making way for Majewski. Cohen switched to left back and Harding slotted in on the right.
Leicester continued to threaten and, after Lansbury had slid in to divert Nugent’s effort wide, Darlow made a superb save from Dyer after the winger cut in from the right.
From the resultant corner, Collins was perfectly placed to head Michael Keane’s effort off the line.
Morgan then claimed the first booking of the game for a foul on Reid, before Chris Wood’s low effort from 22 yards was comfortably saved by Darlow.
But The Foxes had the lead with three minutes of normal time remaining in the half.
Knockaert’s cross from the left byline left Darlow stranded, and Andy King had the simple task of heading into an empty net at the back post.
Three minutes of added time were signalled, and Forest went agonisingly close in the dying seconds.
Cox’s knock down from Cohen’s cross was met by Lansbury in the area. His effort was brilliantly saved by Schmeichel and turned behind for a corner.
What followed was nothing short of frantic. A combination of superb goalkeeping, goal-line clearances and sheer fortune kept The Foxes ahead going into the break, Lansbury and Elliott Ward two to go close in the melees.
No changes were made at half-time - but the scoreline had a very different look on 50 minutes.
Morgan felled Majewski on the left. Reid’s delivery from the resultant free-kick was superb and Ward rose highest to head beyond Schmeichel and level the scores.
Keen to reassert their dominance, Forest put a lovely move together on 54 minutes.
Guedioura bought himself some space in a tight area and sent a raking ball over towards Harding. The full back nodded it infield for Lansbury who immediately looped it over the top for the full back.
Harding connected well with his effort on the stretch but Schmeichel guarded his near post sufficiently to block the effort.
Leicester then spurned a golden opportunity. Dyer’s shot deflected up off Harding and straight to Wood on the penalty spot. He snatched at his volley and sent it hopelessly wide.
The Reds went down the other end and called Schmeichel into action again. Reid slid the ball ahead of Majewski who shifted on to his right before playing Lansbury into the area. The midfielder's shot on the stretch was fumbled by The Foxes’ ‘keeper but Cox, who pounced, was offside.
Wood was then guilty of missing another big chance. Liam Moore, on for De Laet, picked the striker out with an inch-perfect long throw but the New Zealander headed wide.
Two minutes later, Ward improvised brilliantly to scoop his clearance over his own bar from a foot out after Nugent had slid it across from the byline.
Forest were next to go close. Darlow smashed the ball forwards after claiming a cross and Cox controlled well. He laid it off for Reid who picked out Majewski’s near post run perfectly. The Pole glanced his header a foot wide.
Reid was then replaced by Lewis McGugan and, six minutes later, Davies made his intentions clear by sending on Sharp in place of Guedioura.
On 80 mins, Cox spurned a great chance to win it. He raced on to Lansbury’s sensational through ball to bear down on Schmeichel but his first touch let him down and the ‘keeper smothered.
Wood then headed wide again for the visitors, before Knockaert took too long in the area and Cohen got back in time to divert his effort out for a corner.
Leicester were going for it as well - centre back Keane was replaced by winger Ben Marshall with five minutes to play.
James then flashed an effort wide from 24 yards, before his nerves were jangling at the other end as injury-time loomed.
McGugan spun away from him in the area and went down under his challenge, but Mike Dean waved away the appeals.
And, in the first of four added minutes, Leicester had the winner.
Forest conceded possession high up the pitch and, with almost everyone committed upfield, Knockaert exchanged passes with Wood in the area to wrongfoot Darlow, leaving the Frenchman with a simple tap in.
With seconds to play, Henderson’s header flashed inches wide of the post after Ward’s shot from a corner.
Forest then went agonisingly close three times in quick succession deep into added time - Schmeichel was their nemesis yet again and The Foxes held on to claim a place in the npower Championship playoffs.
Forest: Darlow, Halford (Majewski 33'), Ward, Collins(c), Harding, Reid (McGugan 73'), Guedioura (Sharp 79'), Cohen, Lansbury, Cox, Henderson
Subs not used: Al-Rashidi, Ayala, Tudgay, Blackstock
Scorers: Cox 3', Ward 50'
Booking: Lansbury 49'
Leicester: Schmeichel, De Laet (Moore 56'), Morgan(c), Keane (Marshall 85'), Schlupp, Knockaert, James, King, Dyer (Kane 70'), Wood, Nugent
Subs: Drinkwater, Vardy, Logan, Gallagher
Scorers: James 23', King 42', Knockaert 90'
Bookings: Morgan 39', Knockaert 90'
Referee: Mike Dean
Attedance: 28,646 (Away: 2,025)