Raphinha headed 10-man Barcelona to a dramatic 2-1 win at Osasuna in LaLiga, as the Blaugrana recovered from Robert Lewandowski's first-half dismissal to go five points clear at the summit.
Barca fell behind to David Garcia's early header on Tuesday and were a man down when Lewandowski picked up a second booking for a reckless foul on the goalscorer.
Unused substitute Gerard Pique ended his Blaugrana career with a whimper when he also saw red for berating the officials at the break, but Xavi's men hit back in the second half, first through Pedri.
Despite Osasuna looking the more likely victors late on, Raphinha came off the bench to nod in five minutes from time, snatching a crucial victory in Barca's final game before the World Cup.
Osasuna led after just six minutes, although their opener came in controversial fashion as David Garcia headed in a right-wing corner after Marcos Alonso appeared to have been fouled.
Things went from bad to worse for the Blaugrana after 31 minutes, as Lewandowski – having been booked for an early foul on Nacho Vidal – received his marching orders after leaping into an aerial duel with his forearm raised, leaving David Garcia on the ground.
Barca were denied a leveller by the offside flag when Ferran Torres converted Jordi Alba's cross and suffered another blow when Pique was shown a red card following an animated discussion with the officials at the break.
However, the Blaugrana equalised three minutes after the restart, with Pedri slotting into the bottom-left corner after Osasuna failed to clear another Alba delivery.
Osasuna went close to a winner of their own through Kike Garcia's backheel, but they suffered late heartache when Raphinha nodded Frenkie de Jong's searching pass beyond Aitor Fernandez for a precious win.
What does it mean? Barca stay top of the tree for Christmas
The unique nature of this season meant Barcelona approached the match knowing victory would see them top LaLiga at Christmas, leaving rivals Real Madrid unable to overhaul them at the summit before the World Cup break.
Barca faced plenty of adversity at El Sadar but showed they possess the fight required for a title scrap as they moved onto 37 points for the season. That is tied for the third-highest tally they have amassed across their first 14 games of a campaign in LaLiga, having racked up 40 points in both 2012-13 and 2013-14 (also 37 in 2010-11).
Rare red for Robert
Lewandowski's first few months with Barcelona had been an unmitigated success prior to Tuesday's match, with the 34-year-old outscoring every other player in LaLiga in hitting the net 13 times.
However, the red mist descended for the Poland striker at El Sadar as he was dismissed for the first time in the Spanish top flight on what was his 14th appearance in the competition.
Lewandowski was only sent off once in 384 Bundesliga appearances before joining the Blaugrana – for Borussia Dortmund against Hamburg in February 2013.
Pedri leads visitors' fightback
If Barcelona were going to find a way back into Tuesday's game, Pedri always looked the most likely to provide the spark during a typically lively display.
Pedri has now hit the net three times in LaLiga this season – no teenaged midfielder has scored more often Europe's top five leagues this term (Dortmund's Jude Bellingham also has three).
Key Opta Facts
– Barcelona have earned four points thanks to goals scored in the last 10 minutes of their games in LaLiga this season, more than any other team in the competition.
– David Garcia has scored two goals against Barcelona in LaLiga, the only team he has scored more than once against in the competition.
– There have been 54 red cards in LaLiga this season, more than in any other of Europe's top five leagues.
– Raphinha has scored 25 goals in Europe's top five leagues and just two of those were headers, both for Barca in LaLiga.
Barcelona host local rivals Espanyol when LaLiga returns on December 31. Osasuna are also set for action around New Year's Eve as they travel to Real Sociedad.