Barcelona scraped into the semi-finals of the King's Cup on Wednesday by the skin of their teeth, with a streaky 2-2 draw at home to holders Real Madrid, dpa reported.
Pedro and Dani Alves scored for Barca just before half-time, Cristiano Ronaldo and Karim Benzema pulled goals back for Real, who then came close to stealing the tie on the away goals rule.
Barca went into the semi-finals on a 4-3 aggregate, having won the first leg 2-1 in Madrid on January 18. They will now meet either Valencia or Levante in the semis.
Barca have lost just once to Real in 13 games since Pep Guardiola took over as coach in 2008, 1-0 in last season's cup final. But this time they had to dig deep to keep the whites at bay in a frantic finale.
Real coach Jose Mourinho raised eyebrows by starting with Pepe, who received worldwide criticism - but, surprisingly, no punishment -for deliberately treading on the hand of Barca idol Lionel Messi in the first leg.
Gonzalo Higuain missed two good early chances for Real, as Barca struggled to take control.
Barca's Andres Iniesta limped off with yet another pulled muscle but it was Pedro, his replacement, who opened the scoring two minutes from half-time after being played through by Messi.
Two minutes later Alves made it 2-0 with a blistering drive into the top corner, after the Real defence had failed to clear a free-kick.
Real had no choice but to burn their boats in the second half. Ronaldo gave them hope in the 68th minute after being set up by the elegant Mesut Oezil.
Then supersub Benzema quickly made it 2-2 with one of the most impressive goals of his career, picking his way through the Barca defence with grace and inspiration.
Real were just one goal away from an astonishing victory, but it was Barca who actually came close to scoring in a tense finale.
Real defender Sergio Ramos was harshly sent off at the end for elbowing Spain team-mate Sergio Busquets.
The Valencia-Levante tie will finish on Thursday. Valencia won the first leg 4-1 and so are well placed to meet Barca in the semis.
Earlier on Wednesday, Athletic Bilbao booked their place in the semis with a 1-0 win away to Mallorca, courtesy of an own goal from Mallroca defender Ivan Ramis.
Bilbao went into the semis on a comfortable 3-0 aggregate. They will now face third division giant-killers Mirandes, who on Tuesday dramatically eliminated Espanyol.