Match ends, Derby County 2, Queens Park Rangers 0.
Derby County moved into the Championship play-off places as Harry Wilson's stoppage-time double gave them victory over QPR.
The Rams had looked like they would miss the chance to move above Middlesbrough and Bristol City, who both lost, until Luke Freeman fouled Jayden Bogle in the area in the third minute of added time.
Wilson held his nerve to put his spot-kick beyond the reach of Rangers keeper Joe Lumley and into the bottom left-hand corner.
And the on-loan Liverpool man sealed all three points with a breakaway goal in the 11th minute of stoppage time to put Frank Lampard's side sixth, ahead of Boro on goal difference and with a game in hand.
Rams boss Lampard, a regular penalty-taker for England and Chelsea during his playing days, praised Wilson's mettle after the 22-year-old stepped up to fire home from 12 yards.
"It's one thing to have a desire to score goals, and Harry has that, but it's another thing in the real, real moments to step up and take responsibility to score the goal," said Lampard.
"There is probably more risk than reward in terms of if you miss how much people will remember it, so I'm pleased with that from him.
"The whole stadium felt the pressure but fair play to Harry, he kept a cool head."
Penalty controversy sparks frantic finish
The game's decisive moment came when Freeman got a toe on the ball ahead of Bogle in the box but felled the Derby man with his challenge, which resulted in referee David Webb pointing to the spot.
Lampard admitted he was "not sure" the tackle merited a penalty, adding: "We've had a few [penalty appeals turned down] lately that I've been quite vocal on so if we are slightly fortunate then it might have been coming."
Wilson emphatically converted the penalty to spark a frantic finish, with Jack Marriott and David Nugent sending efforts wide for the hosts before Marriott capitalised on a poor clearance to race forward and feed Wilson for his second goal past the despairing dive of Lumley.
The dramatic finish at Pride Park gives Derby fresh impetus in their bid to return to the top flight after an 11-year absence, but they found the R's in stubborn form for most of the afternoon.
Lumley showed good reflexes to get down low to his right to keep out a flicked effort from Martyn Waghorn in the opening five minutes and then tipped a scuffed shot from Mason Mount on to the post in the second half.
Rangers had their chances, too, as an unmarked Matt Smith headed wide from 12 yards out at the start of what was due to be nine minutes of second-half injury time.
The R's have now won just one of their past 10 games but Rotherham's defeat at home by Birmingham means the west London side are assured of a place in the second tier next season.
Derby manager Frank Lampard:
"It's cup football almost now. What's (riding) on these games is so much.
"And we've got to get up for it, and we will be. No doubt about that.
"We'll get focused, the lads need a rest, but they have to be ready because we're striving to get somewhere."
QPR caretaker manager John Eustace:
"I've watched it back and I don't think it is a penalty but it's not a problem.
"We had lots of chances, we were the better team I felt. We didn't take the chances and got punished at the end by a top team.
"I think we are safe now so that was the aim when I took over and we have done that."
- 4BrysonSubstituted forBennettat 38'minutesBooked at 90mins
- 9WaghornSubstituted forMarriottat 69'minutes
- 10LawrenceSubstituted forNugentat 78'minutes
- 23WszolekBooked at 42mins
- 20Osayi-SamuelSubstituted forEzeat 82'minutes
- 11ScowenBooked at 54mins
- 21LuongoBooked at 67mins
- 32WellsSubstituted forWalkerat 90+6'minutes
- 16HemedSubstituted forSmithat 73'minutes
- David Webb
- Shots on Target
Second Half ends, Derby County 2, Queens Park Rangers 0.
Goal! Derby County 2, Queens Park Rangers 0. Harry Wilson (Derby County) right footed shot from the right side of the box to the centre of the goal. Assisted by Jack Marriott following a fast break.
Attempt blocked. Pawel Wszolek (Queens Park Rangers) right footed shot from the right side of the box is blocked.
Mason Bennett (Derby County) is shown the yellow card for a bad foul.
Foul by Mason Bennett (Derby County).
Eberechi Eze (Queens Park Rangers) wins a free kick on the right wing.
Attempt missed. David Nugent (Derby County) right footed shot from the right side of the box is close, but misses to the left. Assisted by Mason Bennett following a fast break.
Attempt missed. Jack Marriott (Derby County) left footed shot from outside the box is close, but misses to the left. Assisted by Mason Mount.
Foul by Jack Marriott (Derby County).
Geoff Cameron (Queens Park Rangers) wins a free kick in the defensive half.
Substitution, Queens Park Rangers. Lewis Walker replaces Nahki Wells.
Goal! Derby County 1, Queens Park Rangers 0. Harry Wilson (Derby County) converts the penalty with a left footed shot to the bottom left corner.
Penalty Derby County. Jayden Bogle draws a foul in the penalty area.
Penalty conceded by Luke Freeman (Queens Park Rangers) after a foul in the penalty area.
Hand ball by Matt Smith (Queens Park Rangers).
Attempt missed. Matt Smith (Queens Park Rangers) header from the centre of the box is close, but misses to the left. Assisted by Ryan Manning with a cross.
Attempt saved. Mason Mount (Derby County) header from the centre of the box is saved in the top centre of the goal. Assisted by Scott Malone with a cross.
Delay over. They are ready to continue.
Delay in match Harry Wilson (Derby County) because of an injury.