Xabi Alonso's second-half goal earned Real Madrid a 2-2 draw against Barcelona in a first-leg Spanish Supercup match the host largely dominated on Sunday.

Alonso fired a low shot beyond goalkeeper Victor Valdes in the 54th minute to equalize after Barcelona had stunned Madrid by taking a 2-1 halftime lead.

Madrid went ahead in the 13th through Mesut Oezil at the Santiago Bernabeu stadium and dictated play for much of the half as Barcelona's passing game lacked its usual sharpness. But the individual quality of its players made up for it, as David Villa and Lionel Messi created goals out of seemingly nothing to give the Spanish champions two valuable away goals.

Barcelona may be able to field Cesc Fabregas in Wednesday's return leg at the Camp Nou after announcing during the game it had reached a deal for the Arsenal midfielder.

In the preseason matchup between the Spanish league winner and domestic cup holder, Madrid created enough chances to merit the victory but was undone by the European champions' ability to take advantage of their few opportunities.

Barcelona looked far from crisp as coach Pep Guardiola left Xavi Hernandez, Sergio Busquets, Pedro Rodriguez and Gerard Pique on the bench, while counterpart Jose Mourinho fielded the same lineup that was routed 5-0 at the Camp Nou in November. Chile forward Alexis Sanchez started in his Barcelona debut but was largely neutralized by Madrid's defense.

Madrid dominated from the outset, and Valdes kept Barcelona in the game by making a number of stops on Cristiano Ronaldo and Karim Benzema, including a ninth-minute header from the Frenchman.

Benzema deserved some credit on Oezil's opener as he cut around Abidal and swiped a pass through Javier Mascherano's legs to set up the Germany playmaker, who beat Valdes at the near post from inside the area.

Madrid's upfield pressure troubled Barcelona into turnovers and kept possession largely away from Messi until the Argentina forward fed Villa in the 36th minute. The Spain striker cut into the left edge of the area and sent a perfect shot over outstretched goalkeeper Iker Casillas into the top far corner of the net for the equalizer.

Benzema and Ronaldo had chances shortly before Messi put the European champions ahead in the 45th. Messi bumped off Sami Khedira and past the fallen Pepe into the area before sliding a left-footed shot past Casillas inside the near post.

But Madrid drew even when Pepe controlled a corner kick and slid a short pass to Alonso to rocket through the crowded area.

Madrid, which had new signings Fabio Coentrao and Jose Callejon debut, continued to press as Valdes got his hands up to deny Ronaldo before catching Benzema's header in the 67th. Barcelona failed to test Casillas again although the visitors were unlucky not to have a penalty awarded to substitute Pedro after Marcelo barged into him inside the area just before the end.