Lionel Messi scored on his 15th straight start to seal a thrilling 4-2 win for Barcelona at Malaga on Thursday, sending the defending champions through to a Copa del Rey semifinal against arch-rival Real Madrid.
Barcelona broke a rare two-game winless streak by outgunning Malaga to reach its sixth semifinal in seven years with a 6-4 victory on aggregate.
At 2-2, the game was heading for extra time when Andres Iniesta combined with Cesc Fabregas to score in the 76th minute. Messi then headed Barcelona's fourth and his 40th goal of the season just four minutes later.
"We knew it would be difficult coming in here in need of a win,'' said Barcelona defender Gerard Pique, who also scored for the visitors. "The result is fair, even though they played a great game. Now we have the luxury of playing a semifinal against Real Madrid.''
This will be the third straight year that Barcelona and Madrid meet in the Copa. Madrid beat Barcelona in the 2011 final, while Barcelona knocked Madrid out of the quarterfinals last season on its way to claiming a record 26th cup title.
Earlier, Atletico Madrid eliminated Real Betis 3-1 on aggregate to reach the other semifinal with Sevilla.
The first half was electric at La Rosaleda stadium. Both teams pressed aggressively and attacked in waves, and the poor pitch only added extra drama with players constantly slipping and sliding on the thin grass.
Barcelona struck first in the eighth minute. Xavi Hernandez played Dani Alves wide on the right, and the Brazil fullback just beat the offside trap before picking out Pedro Rodriguez for a header into the corner of the net.
Joaquin Sanchez replied for the hosts four minutes later when he received Sergio "Duda'' Barbosa's pass on the break and placed a low shot just inside the post to beat diving goalkeeper Jose Pinto.
Messi came close to doing it all alone in the 25th when he intercepted a pass and charged into the area, but Malaga goalie Carlos Kameni was up to the challenge and smothered his point-blank strike.
Even with the away-goal advantage, Malaga continued to push forward and Roque Santa Cruz stabbed a free kick wide in the 36th, moments before Messi played Andres Iniesta through, only to see his shot clip