David Moyes' Real Sociedad held on to record a narrow 1-0 victory over Barcelona as they returned to winning ways at a damp Anoeta on Sunday evening.
An early own goal from Jordi Alba was all the hosts needed as they held off a second-half onslaught from substitute Lionel Messi, with Luis Suarez also denied as Sociedad moved up to 13th in the Primera Division table.
Goalkeeper Geronimo Rulli and the Sociedad defence worked hard to keep the Catalans at bay during Moyes' eighth game in charge as Sociedad claimed their third home victory in succession over Barca, who remain one point behind leaders Real Madrid.
After just two minutes of play, the home side took the lead as Alba put into his own net in a failed attempt to clear the ball from the Barca goal, slotting past teammate Claudio Bravo into the bottom corner from Xabi Prieto's cross from the right of the 18-yard box.
Xavi came very close to netting an equaliser for Barca midway through the first half but his curled free-kick just outside the Sociedad box went narrowly over the bar.
Moments after the half-hour mark Barcelona had an appeal for handball against Inigo Martinez dismissed by referee Carlos del Cerro Grande as they were denied what looked to be a clear penalty.
The visitors continued to search for an equaliser with Pedro shooting wide from close range minutes later, while Jeremy Mathieu was unfortunate to send his long-range effort over the crossbar as Barca pressed forward.
Sociedad's Prieto was brought down by Alba in front of the Barca goal a little over 10 minutes before the break, but appeals for a spot-kick went unheard as Messi warmed up on the touchline.
Moyes was furious as he took to his technical area two minutes before the break after Spain defender Martinez was booked for what looked like a slight touch that brought Suarez down.
Barca had a good chance to level from the resulting free-kick as Xavi picked out Pedro 25 yards out but his powerful shot forced a great save out of Rulli and the hosts went in at halftime with a narrow advantage.
Messi joined the action at the start of the second half, while Neymar came on for Pedro after 58 minutes in an attempt to breathe some life into the Barca side.
Messi came close to scoring a leveller midway through the second half but he sent Neymar's cross past Rulli's goal.
Neymar had an effort saved with 20 minutes left as he played the ball into the 18-yard box before Rulli came out and claimed it with a diving save before the threat became any more dangerous.
Messi collected Suarez's flick back moments later but the Argentina international shot over the bar as the away side continued to dominate.
Luis Enrique's men still found it hard to break down the Sociedad defence but were not short of chances, with Martinez clearing two good efforts to deny them as the half wore on.
Barca searched hard for an equaliser as time began to run out and Suarez broke the line of defenders before the ball was quickly cleared, then his header was tipped over the bar by Rulli.
Tempers began to fray towards the end of the match with Alfred Finnbogason and Alba both booked following challenges while Carlos Vela also limped off for the hosts, but they held on for maximum points during the three minutes of added time.