Ante Budimir scored twice as Osasuna stunned Barcelona, who fell to their first La Liga defeat of the season.
The Croatia striker ghosted in behind the Barca defence to head home Bryan Zaragoza’s cross from close range after 18 minutes.
Zaragoza increased Osasuna’s lead, running clear through on goal and slotting past goalkeeper Inaki Pena.
Pau Victor got a goal back for Barca after the break with an effort that goalkeeper Sergio Herrera fumbled into his own net.
But Budimir restored Osasuna’s two-goal advantage, converting the penalty he earned when was brought down by Sergi Dominguez inside the box.
Abel Bretones extended the lead to 4-1 when he fired a fierce strike from the edge of the area into the bottom right corner with five minutes remaining.
Lamine Yamal pulled one back for Barca with a superb finish into the top corner, but it came too late as the away side.
Defeat means Barca, who had won their opening seven league matches, missed the chance to equal their best-ever start to a campaign. Real Madrid could move a point behind the leaders with victory over Atletico Madrid on Sunday (20:00 BST).
Barca turn their attention to the Champions League where they will host Young Boys on Tuesday (20:00 BST), hoping to bounce back from their opening defeat against Monaco.