Chelsea knocked Derby out of the Carabao Cup in the fourth round as Frank Lampard's return to Stamford Bridge as a manager ended in a dramatic defeat.
Five goals were scored in a frantic first half, including two own goals from Derby defenders Fikayo Tomori and Richard Keogh.
The Championship side came from behind twice through Jack Marriott and Martyn Waghorn.
But Cesc Fabregas slotted home four minutes before half-time for what proved to be the winner.
Derby substitute David Nugent hit the inside of the post with a minute of normal time remaining but the ball rebounded safely into goalkeeper Willy Caballero's hands.
Chelsea have been drawn at home to Bournemouth in a repeat of last season's quarter-final.
The visitors had chances in the second half as Mount, Marriott and Keogh went close, while Chelsea's Gary Cahill was denied from close range and Alvaro Morata had a header saved by keeper Scott Carson.
Before kick-off, a minute's applause was held in tribute to the victims of Saturday's helicopter crash at Leicester City. Former Foxes boss Claudio Ranieri - who managed Chelsea from 2000 to 2004 - was at Stamford Bridge.
Mason Mount was called up to the England squad for the games against Croatia and Spain in October
It was a big night for Chelsea's two on-loan players Tomori and Mount, who were given permission to face their parent club.
Tomori's own goal after just five minutes - which deflected backwards off his standing leg as he attempted to clear Davide Zappacosta's cross - was greeted with encouragement from Lampard, who gestured to remain calm.
Derby responded as Marriott coolly fired an equaliser into the far corner and, after Keogh's own goal - a deflection from another Zappacosta cross - they did so again when Mount turned provider for Waghorn.
Mount showed composure when he slid an inch-perfect ball across goal and he was impressive in the second half, twice going close to scoring.
Both loanees had a point to prove in front of Chelsea's staff and their displays certainly did that - and also showed how the loan system can be beneficial to the Blues.
Chelsea had 70% of the possession but Derby were no bystanders with seven shots on target to the hosts' five.
The side sixth in the Championship were a constant threat in the second half as Marriott's drive was tipped onto the top of the net and Mount went close with a powerful long-range effort.
Keogh almost equalised in the 84th minute when Tom Huddlestone played a sublime ball over the top, while Nugent thought he had scored but saw his shot rebound off the inside of the post.
But Fabregas' goal proved the winner as he took advantage when the ball ricocheted kindly from Chelsea right-back Zappacosta, who was involved in all of their goals.
Chelsea fans honoured Frank Lampard's return with a banner which read "forever a blue, forever a legend"
Chelsea held on to deny Derby another shock win in this competition but it was still an emotional evening for Rams' boss Lampard.
Lampard played 648 times for Chelsea and is the club's all-time leading goalscorer. Before the match, he said he would be "proud and honoured" to face a "club that was his home for 13 years".
It has been a good start to management for Lampard as Derby sit just four points off the Championship leaders - and were unbeaten in five games coming into this tie. They also eliminated Manchester United in the third round, triumphing 8-7 on penalties at Old Trafford.
Lampard received a warm welcome from the home supporters as banners displayed the words "forever a blue, forever a legend" and his name was sung by Chelsea supporters shortly after Fabregas' goal.
He said he was "a lucky man to have a night like that" at full-time and was visibly emotional as he thanked supporters.
Chelsea assistant manager Gianfranco Zola: "It was a tough game. Derby were excellent. They created us more problems. Our defence wasn't as good as other times. But most of the problems were created by them.
"We were in control until about 10-15 minutes to go. In those moments we thought about scoring too much. When you open up against a team with that quality, it is 50-50. We were lucky on occasions."
Derby boss Frank Lampard on Sky Sports: "I'm disappointed. I think we deserved a draw on chances created. The difference between the sides was they scored three... actually we scored four, didn't we? I joke because I'm proud.
"My players had to do really selfless stuff. Who goes through clear against Chelsea like we did on goal? We created chances.
"I'm so thankful to the Chelsea fans. I left through the back door and it upset me at the time but I have nothing but great memories of this place and they thank me like that. I'm a lucky man to have a night like that and I feel it."