Lionel Messi and FC Barcelona rallied to beat Cristiano Ronaldo and Real Madrid 3-2 on Thursday night in the first leg of the Spanish Super Cup, giving Tito Vilanova a victory in his first game as a head coach against José Mourinho.

Ronaldo put the defending La Liga champions ahead in the 55th minute with a header off a corner kick, only for Pedro Rodríguez to tie the score one minute later for the Copa del Rey winner.

Lionel Messi converted a penalty kick in the 70th minute after Sergio Ramos tripped Andrés Iniesta, and Iniesta fed Xavi Hernández for a 3-1 lead in the 78th, delighting a crowd of 91,728.

Barcelona goalkeeper Victor Valdes mis-kicked a backpass in the 85th, allowing substitute Angel Di Maria to get around him for a shot into an open net.

The second leg of the total-goals series is next Thursday in Madrid.

Mourinho poked Vilanova in an eye as Barcelona won the Super Cup last year.

"I would have preferred 3-1 to 3-2, but we played a good game," Vilanova said. "The tie is in still in our favor, so generally we have to be happy."

Mourinho was not entirely displeased with his team's performance despite the Copa del Rey winner's dominance in possession.

"I didn't like how we played in the first half. A team can change your game plan through its play and Barcelona played well, pressured us a lot and didn't let us get out to attack," Mourinho said. "But we played completely different from the first play of the second half."

The Portuguese coach lashed out at referee Clos Gómez, claiming Pedro was offside on the tying goal.

"I'm not surprised he would say that," Vilanova said.

Based on reporting by the Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino