Barcelona hold on to eliminate holders Real
After Barca won last week's first leg in Madrid 2-1, Real came out swinging and probably had the better of the opening exchanges before Lionel Messi released substitute Pedro to open the scoring for the home side in the 43rd minute in front of almost 100,000 spectators at a raucous Nou Camp.
Full-back Daniel Alves looked to have settled the tie when he blasted a spectacular second in first-half added-time, running on to a loose ball and sending a thunderous drive past Real goalkeeper Iker Casillas into the top corner.
Barca appeared to be in total control and they dominated possession at the start of the second half but Real rallied and mounted a rousing late fightback that left them needing just one more goal to advance.
Cristiano Ronaldo, who scored the extra-time winner when Real beat Barca 1-0 in last year's cup final, sped on to Mesut Ozil's pass and finished past Jose Manuel Pinto just over 20 minutes from time and Barca were reeling when substitute Karim Benzema levelled four minutes later.
Both sides had chances in the frenetic final stages before Real centre-back Sergio Ramos was sent off for a second yellow card and Barca then ran down the clock to set up a semi-final against Valencia or Levante, who meet on Thursday.
"The players played a good game," a subdued Real boss Jose Mourinho told a news conference full of curt answers.
Real had played well in the first half and did not deserve to be two behind at the break, he said, adding that he had told his players he wanted more of the same in the second period.
"Before the game we came here with the hope and the motivation of winning," he said.
"If you want I will congratulate Barcelona for the win last week. I am happy to do that as they deserved to win."
The build-up to the game, the fifth meeting between the pair this season, had been dominated by the controversy over an alleged stamp on Messi's hand by Real defender Pepe.
Mourinho included his Portuguese compatriot, who said he did not mean to tread on Messi, in the starting line-up and his every touch was greeted with howls of derision by the Barca faithful.
Barca almost fell behind seconds into the game when centre-back Gerard Pique inexplicably let the ball run through to Gonzalo Higuain but the Real striker skewed his shot wide.
Both sides were on the attack from the start and Ronaldo tested Pinto with a powerful low drive before Messi curled a shot narrowly wide after a swift break orchestrated by Cesc Fabregas.
Ozil came within a whisker of putting Real ahead in the 25th minute when he tried a shot from distance that shook the crossbar and bounced down just outside the goal-line.
Pinto, who plays in the cup instead of first-choice goalkeeper Victor Valdes, then played the ball straight to Higuain but again the Argentina international was unable to take advantage of the error.