Nottingham Forest moved into second place on goal difference after a hard-fought win against promotion rivals Cardiff City.
It was an evenly matched first half with some good end-to-end football and although Cardiff had more chances it was Forest who took the lead courtesy of a powerful header from Wes Morgan.
In the second half the home crowd were stunned when Cardiff were awarded a penalty which put them back on level terms but Forest reacted well to fight back to get the winner.
Forest found the back of the net in the fifth minute after some neat work put Paul Anderson through into the penalty area where he slipped the ball through to Robert Earnshaw, but as he found the target the offside flag went up.
Lee Camp had to make his first save in the tenth minute when Cardiff made a good break and Craig Bellamy found himself in a good position and he sent the ball flying towards the right of goal, forcing Camp to dive to his left to parry the ball away.
Forest created a chanced from a good header by Marcus Tudgay down to Earnshaw in front of goal but he wasted his chance.
Jay Bothroyd missed a chance to take the lead for Cardiff when the Forest defence allowed him too much space and Camp did well to come out and block his effort.
And they came close from the resulting corner when Camp punched the ball away and it came back out to Bellamy whose shot was turned off the line by Paul Konchesky.
Forest missed a chance from a free kick when Chris Cohen flicked the ball to Earnshaw who sent it over the bar.
Cardiff made a quick break and came close when Peter Whittingham sent a long-range shot flying towards goal which had Camp beaten and was only just over the bar.
Forest took the lead just after the half hour mark from a well-taken corner by Lewis McGugan which found Wes Morgan whose powerful header from the edge of the six-yard box went into the top corner.
And they came close to a second from a well-placed cross by Paul Anderson on the left to McGugan whose effort from 12 yards flew off the crossbar.
Cardiff threatened late in the half after winning a corner and Camp had to scramble to gather up the ball in a crowded box.
It was a slightly scrappy start to the second half with both sides giving the ball away too easily, but as both sides regained their composure there were efforts at either end with Kevin McNaughton having a shot from 25 yards saved by Camp and at the other end Earnshaw couldn't quite get on the end of Gunter's cross.
McGugan came close from a free kick after Dekel Keinan fouled Marcus Tudgay and his shot from 25 yards was only just wide of the mark.
And Cardiff were denied when Seyi Olofinjana's shot produced a fantastic save from Camp.
The Forest crowd and bench were stunned when the referee awarded Cardiff a dubious penalty for a foul by McKenna and they were back on level terms when Whittingham sent Camp the wrong way and put the ball into the bottom corner.
And they came close on the break when substitute Jay Emmanuel-Thomas blasted the ball towards goal from 25 yards out and somehow Camp managed to block the ball with his legs.
But Forest were back in front when McGugan went down under a challenge and the referee let Forest take the advantage. Anderson fed the ball through to Earnshaw as he ran into the box to send the ball past Heaton from 12 yards out.
With 20 minutes to go David McGoldrick came on to replace Tudgay and with both sides produceing some great end-to-end football, Nathan Tyson had to wait patiently for his chance to come on for Earhshaw, who received a standing ovation from the crowd.
Forest should have finished the game off when Tyson beat his man and made a superb run from his own end and although his right-foot shot from an angle produced a save from Keaton, he wouldhave done better to cross to McGugan or McGoldrick.
With two minutes of normal time remaining Cardiff made a break and Camp won a free kick for a foul on him by Olifinjana as he went in to make the save.
Just before the four minutes stoppage time started Dele Adebola cam on for Anderson.
It was a tense few minutes but Forest ended the game in control to take all three points.
Nottingham Forest: Camp, Gunter, Morgan, Chambers, Konchesky, Anderson(Adebola 89min), Cohen, McKenna(C), McGugan, Earnshaw(Tyson 81min), Tudgay(McGoldrick 71min)
Subs not used: Smith, Moloney, Lynch, McCleary,
Scorers: Morgan 32min, Earnshaw 68min
Cardiff City: Heaton, McNaughton, Hudson, Keinan, Quinn, Olofinjana, Bellamy(C), Bothroyd, Parkin(Emmanuel-Thomas 56min), Whittingham, Burke
Subs not used:Marshall, Gyepes, Blake, Naylor, McPhail, Koumas,
Bookings: Olofinjana 57min, Hudson 61min, Bothroyd 75min,
Scorer: Whittingham pen 65min
Referee: J Moss
Attendance:26,019 Away attn: 2,665