Match ends, Dundee United 1, Dundee 0.
A dramatic late header from Jaroslaw Fojut sent Dundee United into the League Cup quarter final at the expense of 10-man Dundee.
Radoslaw Cierniak denied Greg Stewart from the penalty spot and Dundee's despair deepened shortly afterwards when Martin Boyle was sent off.
Nadir Ciftci twice hit the crossbar as the depleted visitors clung on for 63 minutes with a man short.
But Fojut powered in to grab the winner from a stoppage-time corner.
Paul Hartley's men left the Tannadice pitch to a standing ovation from their support after battling bravely, but they could not exact revenge for Sunday's 4-1 defeat at Dens Park.
Instead, Dundee United have the derby spoils for the second time in four days.
In front of a full house, the game started at a frenetic pace, and it was the visitors who had the better opening.
Boyle nipped past Sean Dillion to get onto Paul McGinn's through ball and saw a shot deflected just wide, and from the corner Cierzniak did well to deny Luka Tankulic.
Dundee continued to be the more forward thinking side and they were given a gilt-edged chance to take the lead when referee Craig Thomson awarded them a penalty.
John Rankin took down Paul McGowan but Stewart saw goalkeeper Cierzniak guess right and his effort was pushed away.
If that was a blow to Hartley's men, it went from bad to worse when they were reduced in numbers.
McGowan lost possession and Stuart Armstrong raced forward on the counter-attack. Boyle knocked the midfielder over as he bore down on goal and the referee deemed it as a clear goalscoring opportunity.
Ciftci hit the bar with the resulting free-kick as the home side looked to take advantage.
United, inevitably with the extra man, started to look more dangerous and Ciftci again had an opportunity but directed a header just wide.
The Turkish striker was a man on a mission and again thundered a shot off the bar from a tight angle as United continued to chase the opening goal into the second half.

Armstrong then fired in a volley that was brilliantly tipped onto the post by Kyle Letheren before Simon Ferry had to head off the line as the pressure on the visitors increased.
The game was still alive for both teams though and Dundee raced forward through Stewart and Jim McAlister, before McGowan chipped the ball just over the crossbar.
Despite being a man down Dundee were finding energy from somewhere and James McPake was inches away from connecting with Philip Robert's cross with just five minutes left.
However, back came United and Dundee were heroically holding on until Fojut met Gary Mackay-Steven's late corner and bulleted a header into the net to spark wild scenes at Tannadice.
Dundee United manager Jackie McNamara: "We're relieved more than anything.
"With Dundee playing so long with 10 men it was a frustrating night all round, but I think you give them credit for the way they worked; they gave everything for Paul [Hartley] tonight.
"You think it's going to be one of those nights. We hit the woodwork a few times, had a couple cleared off the line. Jaroslaw actually had a couple of chances before he got the winner. I'm delighted for him because he's been excellent for us."
Dundee manager Paul Hartley: "I thought it was an outstanding game of football. It was end to end.
"We were outstanding for the first 30 minutes of the match, we controlled it, create chances - obviously there was the penalty miss.
"The sending-off sort of kills it for us and we'll have to look at that because I don't think that's a sending-off for me, I don't think there's any contact whatsoever. The referee made some strange decisions tonight."
Line-ups
Dundee Utd
Formation 4-2-3-1
- 1Cierzniak
- 5Fojut
- 14Morris
- 12Watson
- 2Dillon
- 6Paton
- 8RankinBooked at 42minsSubstituted forBilateat 57'minutes
- 24SpittalSubstituted forErskineat 77'minutes
- 18DowSubstituted forMackay-Stevenat 54'minutes
- 10S Armstrong
- 7Ciftci
Substitutes
- 11Mackay-Steven
- 17Erskine
- 19Bilate
- 21Telfer
- 23Smith
- 26Szromnik
- 33Spark
Dundee
Formation 4-4-2
- 1Letheren
- 2IrvineBooked at 72mins
- 4Konrad
- 5McPake
- 19McGinn
- 11Ferry
- 23BoyleBooked at 27mins
- 20McAlister
- 18McGowan
- 15Stewart
- 21TankulicSubstituted forRobertsat 58'minutes
Substitutes
- 8McBride
- 12Bain
- 14Roberts
- 16Clarkson
- 29Harkins
- 30Kerr
- 33Wighton
- Referee:
- Craig Thomson
- Attendance:
- 13,041
Match Stats
- Possession
- Home51%
- Away49%
- Shots
- Home11
- Away8
- Shots on Target
- Home3
- Away5
- Corners
- Home6
- Away8
- Fouls
- Home15
- Away4
Live Text
Post update
Full Time
Second Half ends, Dundee United 1, Dundee 0.
Goal!
Goal! Dundee United 1, Dundee 0. Jaroslaw Fojut (Dundee United) header from the centre of the box to the top left corner. Assisted by Gary Mackay-Steven.
Post update
Corner, Dundee United. Conceded by James McPake.
Post update
Foul by Simon Ferry (Dundee).
Post update
Mario Bilate (Dundee United) wins a free kick in the defensive half.
Post update
Attempt missed. Chris Erskine (Dundee United) left footed shot from outside the box is close, but misses the top left corner.
Post update
Corner, Dundee. Conceded by Callum Morris.
Post update
Greg Stewart (Dundee) wins a free kick on the right wing.
Post update
Foul by Stuart Armstrong (Dundee United).
Post update
James McPake (Dundee) wins a free kick in the attacking half.
Post update
Foul by Mario Bilate (Dundee United).
Post update
Corner, Dundee. Conceded by Sean Dillon.
Post update
Paul McGinn (Dundee) wins a free kick on the left wing.
Post update
Foul by Gary Mackay-Steven (Dundee United).
Substitution
Substitution, Dundee United. Chris Erskine replaces Blair Spittal.
Post update
Attempt blocked. Nadir Ciftci (Dundee United) right footed shot from outside the box is blocked.
Booking
Gary Irvine (Dundee) is shown the yellow card.
Post update
Foul by Gary Irvine (Dundee).
Post update
Gary Mackay-Steven (Dundee United) wins a free kick in the defensive half.