A Barcelona team without Lionel Messi and Luis Suarez at the starting line, suffered a shock home defeat by newly promoted Alaves on Saturday.
Manager Luis Enrique had benched the duo, including the midfielder Andres Iniesta.
Alave’s Brazilian forward Deyverson silenced the Nou Camp when he stabbed home Kiko Femenia’s cross from seven yards.
Defender Jeremy Mathieu headed the equaliser from Neymar’s corner.
Ibai Gomez scored the winner – beating debutant keeper Jasper Cillessen from just inside the area – soon after Messi came on for the La Liga champions.
Suarez was introduced after Gomez’s goal but Alaves hung on to claim a first league win at the Nou Camp since 2000.
Barca are three points behind leaders Real Madrid, who beat Osasuna 5-2 earlier on Saturday in Ronaldo’s first game back from injury.
As BBC reported, Enrique appeared to have one eye on Tuesday’s Champions League home group game against Celtic, making seven changes to the team that won 1-0 at Athletic Bilbao before the international break.
Although Javier Mascherano, Sergio Busquets and Neymar were included, Barcelona produced one of their poorest performances for some time.
Even after Mathieu’s equaliser in the first minute of the second half, Barcelona continued to live dangerously as Alaves’ Edgar Mendez had a goal ruled out for offside.
Mathieu blasted wide of an open net before Mascherano was caught out on the edge of the Barcelona penalty area and Gomez wriggled free to slot into the far corner.