Mikel Merino and Alexander Sorloth scored in each half to earn Real Sociedad a 2-1 win at Barcelona on Saturday, handing the LaLiga champions their first home defeat of the season on a day when they were celebrating their title triumph.
With the league title in the bag, there was an end-of-season feel at Camp Nou as the fans waited to see the post-game celebrations when Barca would lift the LaLiga trophy.
- Stream on ESPN+: LaLiga, Bundesliga, more (U.S.)
However, Real Sociedad made sure it would not go all Barca's way as they got in-front quickly, with Merino scoring with a tidy finish in the fifth minute.
They extended their lead with Sorloth in the 72nd minute and Robert Lewandowski headed in a consolation for Barcelona from close-range in the 90th minute.
With three games left, fourth-placed Real Sociedad moved on to 65 points and tightened their grip on the last Champions League qualification spot, five points ahead of fifth-placed Villarreal who beat Girona 2-1 earlier on Saturday.
Champions Barcelona have an unassailable 14-point lead over second-place Real Madrid, who play at Valencia on Sunday. Atletico Madrid are third on 69 points.
"If you remember at the start of the season, I asked for unity," Barcelona manager Xavi Hernandez said on the Camp Nou pitch. "Now is the moment to say thank you. Firstly, to the president and his board of directors for the unconditional support they have given us. 'We aren't that bad, eh, presi?' We are very grateful.
"Thank you to the staff, the players who have given everything on the pitch. And to the fans. Without you it would not have been possible. You have been spectacular. Those that have filled the stadiums, those that were at the bus parade. It's given me goosebumps."
Captain Sergio Busquets received the LaLiga trophy from federation president Luis Rubiales and presented it to the crowd with his teammates. The occasion was also a celebration of the midfielder, who claimed his 32nd and last title before he leaves Barcelona this summer.
"No one doubt that this is just getting started," the 34-year-old said "Thanks to all the fans because it's not possible without you. Thanks to the staff for helping us be at our best.
"Also, a word for Hector Bellerin, Pierre-Emerick Aubameyang, Gerard Pique, Memphis Depay and our teammates from the team that have also helped us win this title," he added, referencing those players who began the season with Barcelona but have since departed.
Information from ESPN's Sam Marsden contributed to this report.