Juan Mata booked Manchester United's place in the EFL Cup quarter-finals as his second-half strike sealed a 1-0 victory over Manchester City at Old Trafford.
The Spaniard's drilled effort, 54 minutes into Wednesday's fourth-round tie, proved decisive as United atoned for Sunday's hammering at Chelsea with a morale-boosting victory against their nearest rivals.
The result means Pep Guardiola is now on his worst winless run as a manager, with City failing to win any of their last six in all competitions.
For Jose Mourinho, who claimed only his fourth victory over Guardiola, a home tie with West Ham in the last eight awaits.
The 173rd Manchester derby began with Mourinho issuing an apology to supporters for his side's display at Stamford Bridge. Michael Carrick, making only his third start of the season, was drafted in to captain the hosts who made four changes.
Vincent Kompany and Leroy Sane were the only players to retain their places from City's draw with Southampton as Guardiola made nine changes.
Having conceded inside 30 seconds at Stamford Bridge, it was so nearly another nightmare start for United as Kelechi Iheanacho headed Jesus Navas's cross over the bar inside two minutes.
That chance bred confidence in Guardiola's much-changed side as they refused to be overawed in the opening exchanges, pressing United high in their half.
Referee Mike Dean waved away City's claims for a penalty on 10 minutes after Carrick's unintentional collision with Garcia Serrano went unpunished.
A disjointed first-half display meant it would take United 36 minutes to register a chance of note, which saw Zlatan Ibrahimovic's shot deflected over the target.
Having beaten Nicolas Otamendi, Marcus Rashford's hesitation a minute later allowed City to block his attempt on goal as the hosts came to life in the closing stages of the first half.
United took advantage of Kompany's half-time substitution to make a blistering start to the second period.
With four minutes on the clock, Ander Herrera and Ibrahimovic combined down the right to play Paul Pogba through on goal, but Willy Caballero turned his near-post shot onto the frame of the City goal.
The United pressure, however, soon told. Having got the better of Otamendi in the air, Ibrahimovic played the ball inside for Herrera, who went to ground following a collision with Fernando.
Before referee Mike Dean even had the chance to wave the penalty appeal away, Mata arrived in the box to drill low past Caballero.
Having played a part in United's opener, Ibrahimovic should have made the result comfortable, but he was unable to steer Rashford's inch-perfect cross home on 64 minutes.
Guardiola turned to Raheem Sterling and Sergio Aguero for the final quarter as City looked to force extra-time, but they were met by a dogged United defensive performance.
City, who have never won a cup tie at the home of their rivals, continued to toil for a route back into the game but United were in no mood as they saw out the victory without conceding a shot on target - the first time City have failed to hit the target since April 2012.