Manchester City lost 1-0 to Manchester United on Wednesday but hung on to reach the League Cup final 3-2 on aggregate and will face Aston Villa at Wembley.
Nemanja Matic's 35th-minute strike gave United victory at the Etihad Stadium but the midfielder was later sent off and it was not enough to overturn the 3-1 deficit from the semi-final first leg at Old Trafford.
Matic struck home a thumping half volley off the post as City failed to clear Fred's curling free-kick in United's first threatening attack of the game.
But the Serbian was shown a red card for his second bookable offence 15 minutes from time and United were unable to get the second goal which would have sent the tie to penalties.
Matic's first goal in more than a year offered United the tantalising possibility of turning round the tie after City had made the early running and twice forced saves out of goalkeeper David de Gea.
Raheem Sterling had the ball in the net six minutes after United went ahead but was offside and 13 minutes into the second half he conjured up a horror miss as he tried to round De Gea.
The goalkeeper did enough to force him a touch wide, allowing time for defenders to drop behind and when Sterling found space to strike, he was off balance and hit the ball over the crossbar.
There was another let-off for United when Harry Maguire was caught in possession, but City again dithered and allowed the defence to block the chance.
With six minutes to play, Sergio Aguero netted after a clever through ball from Joao Cancelo but was marginally offside.
United had a rare opportunity to get the second goal with an 88th-minute free-kick after Maguire was fouled just outside the penalty area, but Fred struck his shot against the wall.
It was City's first match in 25 without scoring.
"I can't really comprehend how we lost this game," City midfielder Kevin de Bruyne said.
"For me, United had only one chance today. In front, we were way too wasteful and we have to learn from this. But in the end it's good that we go into the final."
The final is on March 1 when City will seek to win the trophy for a third successive year and fourth time in five seasons.
Defeat in the tie ended United's hopes of winning the trophy in what has been a disappointing season, but manager Ole Gunnar Solskjaer was happy enough after a second successive win at the Etihad.
"I am so proud of these players. They have beaten City twice at their ground. They have come so far these players. They have given me absolutely everything," the Norwegian added.
"Even though we did not create too many clearcut chances we pressed them back. It pleased me."