A stunning second half will see Barcelona take a 3-2 lead into the second-leg of the Spanish Super Cup after a memorable first Clasico of the new season at Camp Nou.
Following an opening period featuring few chances, Real took a surprise lead through Cristiano Ronaldo's header before an almost immediate equalizer from Pedro. Barcelona looked to be running away with the match and potentially the trophy as they then struck twice from a Lionel Messi penalty and a fine goal from Xavi. However, a disastrous error from Victor Valdes allowed Angel Di Maria to pull one back late on to leave the destiny of the season's first silverware firmly in the balance.
In his first Clasico as Barcelona coach, Tito Vilanova will doubtless be pleased with the way his side responded from going behind, albeit there is sure to be disappointment too that their lead is not greater.
Real Madrid began the match in impressive fashion as they looked to pressure their opponents at every opportunity. A predictable pattern soon took over, though, as Barcelona gained control with their famed short-passing possession-based game.
While the home side looked to probe, Real's defense was doing an excellent job of preventing Barcelona from getting clear sights on goal.
The best chance in the opening period would fall the way of Lionel Messi. Dani Alves was in space down the right after a typical burst upfield and showed excellent awareness to pull the ball all the way back to Messi on the edge of the box, but the Argentinian placed his shot agonizingly wide of the upright.
Alves was providing an effective attacking option. Minutes later the Brazilian was inches away from picking out Pedro at the far post with an audacious ball with the outside of his right foot.
The next opportunity was all about Messi, though, as the twinkle-toed magician evaded two Real challengers as he ran along the edge of the box, but again missed the target with a low effort on his left foot.
While the match was still scoreless there remained plenty of tension out on the pitch. It may not have meant as much as a battle for La Liga or the Champions League, but the players were still riled up for the occasion. Messi and Fabio Coentrao got involved in a flailing of arms and legs, while the tackles were also raining in, especially form Real.
The first half ended with controversy too as Barcelona had appeals turned down for a penalty. Alexis Sanchez tumbled theatrically under the challenge of Sergio Ramos and replays showed that there was little or no contact with the Chilean.
Against the run of play, it was Real that took the lead 10 minutes after the restart. From an in-swinging Mesut Ozil corner, Ronaldo, comfortably got to the ball ahead of Sergio Busquets and once again showed his aerial prowess with a powerful header past Valdes at the near post.
With Real fans still celebrating, Barcelona stormed straight upfield to get straight back on level terms. Javier Mascherano sublime chipped through ball to find Pedro with his body just about level with the last defender and the forward displayed a perfect first-touch before sliding it past Iker Casillas at his near post.
The goals sparked the match into life and both teams went end to end in search of the lead. Alves produced a fine save from Casillas, while Real produced two excellent blocks in succession from Barcelona defenders at the other end.
There was another goal coming and it did not take long in arriving. Iniesta, having another fine match, made a burst down the right of the area and was taken to the ground by a desperate lunge from Ramos to leave the referee pointing to the spot. While there was contact with the ball from the defender, it was a firm challenge that followed through and took away the legs of his international teammate.
Messi, who had missed a recent spot kick for Argentina against Germany, made no mistake with this one as he slotted it calmly to Casillas' left with the keeper going the other way.
While Real remained in the game, Barcelona put daylight between them and their opponents with a third goal in the 78th minute. Iniesta showed his full-range of abilities as his close control allowed him to skip past several tackles on the edge of the area, before slipping a perfectly weighted through ball to find Xavi clean through and the veteran midfield slotted the ball past Casillas.
At 3-1, Barcelona were looking good to take home the first silverware of the new season in the return leg at the Bernabeu. But with just five minutes remaining, a catastrophic error would give Real a potentially vital second goal.
Adriano laid the ball back to his goalkeeper under little pressure, but Valdes dallied unnecessarily allowing substitute Di Maria to make a challenge and win the ball before sliding it into an empty net. After some of the quality that had gone before it, it was a bizarre way for the evening's scoring to end.