Messi had the first chance for Barcelona in the fifth minute as a solid pass by Cesc Fabregas found Leo onside, but Messi's shot went wide left.
But two minutes later, Messi got his goal. It was Messi's first goal at San Sebastian in his career. The goal also made it 10 straight games with a goal or more. Leo is only the third player to do this (Martin, Ronaldo) in FC Barcelona history.
In the 14th minute, Pedro nearly had a golazo, but the ball hit the post.
Antoine Griezmann's shot went just wide right for Real in the 17th minute.
Pedro got his goal in the 25th minute. Xavi made a terrific pass to Dani Alves who stayed onside, and Alves crossed it low in and found an open Pedro for the second Barcelona goal. Great teamwork on that play.
What looked like a goal for La Real was taken away as offsides in the 33rd minute.
Xavi had another fantastic pass—this time to Messi—whose lob shot over the charging goalkeeper Claudio Bravo hit the right post.
In the 40th minute, Real Sociedad got their goal. Carlos Vela found Chori Castro to his left, and the Uruguayan slotted it past Victor Valdes for the 1-2 scoreline.
A powerful shot by Messi was nicely stopped by Bravo in the 44th minute.
In the second half, Gerard Pique was booked for the second time on the night in the 56th minute. Barcelona went down to 10 men for the rest of the game. A minute later, Carlos Martinez's shot was blocked by Sergio Busquets. Cesc Fabregas was taken out of the game to add an extra defender. Javier Mascherano came in for Fabregas.
Real Sociedad took the one-man advantage and leveled the game in the 63rd minute as Castro's shot on goal was deflected off Mascherano's knee and deflected off Valdes' hand and into the back of the net for the equalizer. Mascherano now has three own-goals this 2012-13 season in all competitions.
Just when it looked like the game was going to end in a draw, a great cross combined with bad Barcelona defending saw Imanol Agirretxe put the game-winner into the back of the net to send the San Sebastian in a joyous uproar.
FINAL: Real Sociedad 3 - 2 FC Barcelona
If you saw the game, you don't need a list of reasons for you to know why FC Barcelona lost.
Missed opportunities/bad luck for the Barca offense.
Pique being sent off was bad for Barca.
But most importantly, great La Real play.
Let's talk about the three most important lessons "From the Mind of Xoel" from FC Barcelona's first loss this season in La Liga.