Alex McLeish secured his first victory as Nottingham Forest manager with a deserved home win over Peterborough.
Forest should have taken the lead when Radoslaw Majewski fired over from eight yards and did so when Greg Halford headed in from Henri Lansbury's corner.
The visitors equalised as George Boyd's corner hit Lansbury and fell for Scott Wootton to convert from close range.
But McLeish's men snatched a late winner through Elliot Ward's powerful header, following a Majewski corner.
The victory moves Forest up to ninth, while Peterborough continue to linger around the Championship relegation zone.
Forest started well and Dan Harding's cross found Majewski, who skied his effort when he should have hit the target.
However, they did not have long to wait - Halford's header looked to have been cleared off the line, but the referee's assistant gave the goal.
Posh could have been level moments later as Davide Petrucci found himself in space on the edge of the box, only to shoot wide.
There were appeals for a Forest penalty when Simon Cox went down under the challenge of Wootton, but referee Eddie Ilderton was unmoved.
Billy Sharp had two chances to double Forest's lead, firing wide from Chris Cohen's cross and then seeing a header brilliantly saved by Robert Olejnik.
Olejnik was called into action early in the second half as Cox almost met a Cohen pass, but the goalkeeper rushed out and smothered.
Darren Ferguson introduced 17-year-old Jaanai Gordon-Hutton in an attempt to lift his side and it worked as Boyd's set-piece struck Lansbury and fell kindly for Wootton, who hammered home.
The home side should have taken the lead as Cox played the ball across the box, but Majewski shot wide when it looked easier to score.
But seven minutes from time Majewski swung in a corner which Ward powerfully headed in.
Nottingham Forest manager Alex McLeish:
"It's no secret that we are still looking to bolster the squad. If we are going to have a real go at the play-offs we need three or four players to come through the door.
"I thought we showed a lot of character against Peterborough to come back from what was a horrible result in the FA Cup last weekend (3-2 defeat by Oldham).
"And we showed more of that character during the game to come back and get the winner after Peterborough had equalised.
"We were a wee bit nervous for a time after they scored but credit to the players for sticking at it."
Peterborough boss Darren Ferguson:
"To lose two goals and the game to two set-pieces is very disappointing because I thought a draw would have been a fair result.
"I am repeating myself a lot this season but I told the players afterwards that it was another game we should not have lost but it was frustrating to concede the way we did.
"Things went against us at times. I have seen the first goal and I'm still not convinced that it was over the line but the referee's assistant decided from 40 yards away that it was.
"We should have also had what I thought was a blatant penalty but there's no point in talking to officials about things like that."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The final whistle is blown by the referee.90:00 +3:58
Shot from outside the box by Chris Cohen goes wide right of the target.90:00 +3:24
George Boyd concedes a free kick for a foul on Gonzalo Jara Reyes. Free kick taken by Greg Halford.89:07
Nathaniel Mendez-Laing delivers the ball, Karl Darlow makes a save.88:17
Foul by Simon Cox on Michael Bostwick, free kick awarded. Indirect free kick taken by Scott Wootton.87:16 Substitution
Substitution Guy Moussi comes on in place of Radoslaw Majewski.86:56 Substitution
Substitution Nathaniel Mendez-Laing comes on in place of Shaun Brisley.84:53
George Boyd takes the direct free kick.84:53 Substitution
Substitution Grant McCann on for Joe Newell.84:53 Booking
Booking Jonathan Greening is shown a yellow card.84:46
Simon Gillett concedes a free kick for a foul on Dwight Gayle.83:41
Long range shot by Simon Cox goes wide right of the target.82:35
Assist on the goal came from Radoslaw Majewski.82:35 Goal scored
Goal! - Elliott Ward - Nott'm For 2 - 1 Peterboro Elliott Ward finds the net with a goal from close in to the top right corner of the goal. Nottm Forest 2-1 Peterborough.82:13
Jonathan Greening crosses the ball, Mark Little makes a clearance. Radoslaw Majewski takes the inswinging corner,80:55
Dan Harding produces a left-footed shot from inside the area that goes over the bar.80:06
Dwight Gayle is flagged offside by the assistant referee. Free kick taken by Karl Darlow.79:07 Substitution
Substitution Henri Lansbury leaves the field to be replaced by Jonathan Greening.78:27
Shot from inside the area by Radoslaw Majewski clears the bar.77:51
Chris Cohen challenges Davide Petrucci unfairly and gives away a free kick. Michael Bostwick takes the indirect free kick.
The ball is swung over by Chris Cohen, save by Robert Olejnik.76:32
Inswinging corner taken by Chris Cohen from the right by-line played to the near post, Robert Olejnik makes a save.74:34
Davide Petrucci challenges Henri Lansbury unfairly and gives away a free kick.74:16
Indirect free kick taken by Karl Darlow.74:16 Booking
Booking Davide Petrucci is cautioned.71:28
Shot from long distance by George Boyd misses to the right of the goal.69:08
The ball is crossed by Gonzalo Jara Reyes, Scott Wootton manages to make a clearance.68:30
Henri Lansbury takes a inswinging corner from the left by-line played to the near post, Mark Little makes a clearance.67:42
Centre by Chris Cohen, Michael Bostwick makes a clearance.66:57
Corner taken by Henri Lansbury from the left by-line played to the near post, Mark Little makes a clearance.65:23
Free kick awarded for a foul by Radoslaw Majewski on Tommy Rowe. Free kick taken by Shaun Brisley.64:10
George Boyd takes a shot. Save by Karl Darlow.61:43
Michael Bostwick concedes a free kick for a foul on Simon Cox. Chris Cohen restarts play with the free kick.61:13
Foul by Dwight Gayle on Dan Harding, free kick awarded. Karl Darlow takes the free kick.59:20 Goal scored
Goal! - Scott Wootton - Nott'm For 1 - 1 Peterboro Scott Wootton finds the back of the net with a goal from inside the six-yard box low into the middle of the goal. Nottm Forest 1-1 Peterborough.58:52
Inswinging corner taken from the right by-line by George Boyd,56:38 Substitution
Substitution Jaanai Gordon-Hutton joins the action as a substitute, replacing Kane Ferdinand.56:22
Henri Lansbury produces a right-footed shot from outside the penalty box and misses right.54:12
Inswinging corner taken by George Boyd from the right by-line.52:44
Radoslaw Majewski crosses the ball, clearance by Scott Wootton. The ball is sent over by Chris Cohen, Elliott Ward takes a shot. Save made by Robert Olejnik.52:11
Radoslaw Majewski takes a inswinging corner.51:06
Inswinging corner taken from the right by-line by George Boyd.50:36
Corner from the left by-line taken by George Boyd, Chris Cohen makes a clearance.47:54
The ball is swung over by Simon Cox, clearance made by Tommy Rowe.46:44
Henri Lansbury takes a inswinging corner from the left by-line to the near post, Scott Wootton manages to make a clearance.45:21
Scott Wootton fouled by Simon Cox, the ref awards a free kick. Michael Bostwick takes the free kick.45:01
The referee gets the second half underway.45:00 +1:07 Half time
Half Time The referee calls an end to the first half.45:00 +0:18
George Boyd takes a inswinging corner.44:23
The official flags Billy Sharp offside. Scott Wootton restarts play with the free kick.43:07
Shot by George Boyd from 12 yards. Save made by Karl Darlow.42:19
The ball is sent over by Radoslaw Majewski, clearance made by Scott Wootton. Shot by Gonzalo Jara Reyes from outside the box goes over the net.40:30
The ball is delivered by Simon Cox, Chris Cohen takes a shot. Save by Robert Olejnik. Corner taken by Chris Cohen from the right by-line played to the near post, Scott Wootton makes a clearance.39:40
A cross is delivered by Chris Cohen, Billy Sharp has an effort at goal from the edge of the box that misses to the right of the target.38:02
Tommy Rowe delivers the ball.36:04
Free kick awarded for an unfair challenge on Joe Newell by Simon Gillett. Shaun Brisley restarts play with the free kick.32:54
A cross is delivered by Chris Cohen.32:30
Dwight Gayle challenges Elliott Ward unfairly and gives away a free kick. Elliott Ward takes the free kick.31:45
A cross is delivered by Tommy Rowe, Greg Halford manages to make a clearance.30:08
Davide Petrucci produces a right-footed shot from the edge of the area and misses to the left of the target.27:16
Assist by Henri Lansbury.27:16 Goal scored
Goal! - Greg Halford - Nott'm For 1 - 0 Peterboro Greg Halford finds the net with a goal from inside the area high into the middle of the goal. Nottm Forest 1-0 Peterborough.26:51
Corner taken by Henri Lansbury from the left by-line,25:02
Mark Little concedes a free kick for a foul on Radoslaw Majewski. Gonzalo Jara Reyes takes the direct free kick.24:13
George Boyd takes the inswinging corner, Henri Lansbury manages to make a clearance.23:23
Simon Gillett crosses the ball.22:32
Unfair challenge on Billy Sharp by Scott Wootton results in a free kick. Indirect free kick taken by Simon Gillett.21:19
Simon Cox produces a cross, save by Robert Olejnik.17:07
Dan Harding crosses the ball. Effort on goal by Radoslaw Majewski from inside the area goes harmlessly over the bar.15:16
Free kick awarded for an unfair challenge on Chris Cohen by George Boyd. Henri Lansbury crosses the ball in from the free kick, Kane Ferdinand manages to make a clearance.14:41
Inswinging corner taken right-footed by Henri Lansbury played to the near post, Michael Bostwick makes a clearance.12:56
Henri Lansbury fouled by Davide Petrucci, the ref awards a free kick. Gonzalo Jara Reyes restarts play with the free kick.11:11
Dwight Gayle has an effort at goal. Karl Darlow makes a save.10:02
Simon Cox is flagged offside by the assistant referee. Robert Olejnik takes the free kick.7:48
Centre by Chris Cohen, clearance made by Michael Bostwick.6:19
The referee blows for offside against Dwight Gayle. Karl Darlow takes the free kick.4:40
Mark Little fouled by Dan Harding, the ref awards a free kick. Free kick taken by Mark Little.4:27
Chris Cohen crosses the ball.3:19
A cross is delivered by Tommy Rowe, save by Karl Darlow. Handball decision goes against Billy Sharp. Free kick taken by Kane Ferdinand.0:00
The referee gets the game started.
Live data and text provided by our data suppliers