Real Sociedad have delivered David Moyes a famous 1-0 win over Barcelona at the Anoeta.
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.
"It was Real Sociedad's only dangerous chance. We controlled the match, especially in the second half when we got closer to their net," said Barca coach Luis Enrique.
"We deserved more than that," he said, adding: "we were a bit unlucky not to have scored the tying goal."