Barcelona scored two goals in three second-half minutes to come from behind and beat Real Sociedad to maintain their 100% start to the La Liga season.
The champions trailed after 12 minutes when they failed to clear a free-kick and Aritz Elustondo lashed in.
But Luis Suarez scrambled the ball home in the 63rd minute before Ousmane Dembele converted at another corner.
La Real could have been further in front but missed three chances shortly before the Barcelona goals.
Barca goalkeeper Marc-Andre ter Stegen made two fine saves, denying Real Madrid loanee Theo Hernandez and Juanmi while Mikel Oyarzabal blazed over at the end of a quick counter-attack.
The hosts, playing at their newly renovated Anoeta stadium for the first time, could have grabbed a point late on but Juanmi headed narrowly wide from inside the area.
Barcelona were poor in the first half and also capitalised on goalkeeping errors for both goals with Geronimo Rulli missing punches at both set pieces.
The win for Ernesto Valverde’s side is their fourth from four games this season and keeps them top of the table.
Earlier in the day, Atletico Madrid needed an injury-time debut goal from Borja Garces to draw 1-1 with Eibar.