Harry Wilson scored twice in stoppage time as Derby boosted their Sky Bet Championship play-off prospects with a 2-0 victory over QPR.
Wilson converted a penalty in the fifth minute of added time and then broke away to clinch a vital win which lifts Frank Lampard's team up to sixth.
The Rams had scored 10 goals in their previous two home games and they went close in the fourth minute when Martyn Waghorn flicked on a Wilson free-kick but Joe Lumley parried before the ball was scrambled clear.
QPR broke dangerously with Luke Freeman's cross bouncing off goalkeeper Kelle Roos, before Fikayo Tomori had to get across to block Nahki Wells' shot in the eighth minute.
The visitors created another opening in the 19th minute when Bright Osayi-Samuel linked up with Wells but the striker's shot lacked power and when Derby gave the ball away four minutes later, Freeman fired wide.
The hosts looked nervous but they created an opportunity in the 29th minute when Scott Malone's cross was knocked down for Craig Bryson but Massimo Luongo made a vital block which left the Scot needing treatment.
Bryson continued but was substituted in the 38th minute and at the end of a frustrating first half, Derby knew they had to improve.
Wilson saw a dipping free-kick pushed away by Lumley and Waghorn had a chance in the 57th minute but he could not get his header from Jayden Bogle's centre on target.
Mason Mount got in behind and cut the ball back but it was put behind for a corner and the midfielder screwed a shot wide on the turn.
QPR had a great chance on the break in the 63rd minute. Osayi-Samuel went past Malone on the left and sent in a low cross which Tomer Hemed failed to turn into an empty net.
The Rams threatened six minutes later when Wilson's pass released Mount but his shot was pushed against a post by Lumley.
With seven minutes remaining QPR came close when substitute Matt Smith headed over and Roos had to react quickly to deny Wells at the back post after another counter-attack.
The home fans were cheered when nine minutes of added time were announced – and Derby were awarded a penalty in the fourth.
Bogle went over Freeman's leg and referee David Webb sparked furious protests from the visitors by pointing to the spot.
Wilson drove the ball low to Lumley's right and although the visitors' goalkeeper went the right way, he could not keep the effort out.
QPR pressed for an equaliser but were caught on the break when winger Wilson ran clear and squeezed his low shot past Lumley to make sure of the points.