Barcelona rescued a dramatic draw at Espanyol in a fiery Catalan derby thanks to a last-minute equaliser from Luuk de Jong.
The Dutchman headed in a leveller in the sixth minute of stoppage time to salvage a draw for Barca in a game that will represent two points dropped in their pursuit of a Champions League place.
It was a drama-filled encounter that saw both sides reduced to 10 men in the closing stages with veteran Barca defender Gerard Pique sent off alongside opponent Nico Ribaudo.
Pedri had given Xavi Hernandez's side a second-minute lead at the RCDE Stadium but superb goals from Sergi Darder and Raul de Tomas turned the game on its head.
It had taken Xavi side less than 80 seconds to open the scoring as teenage midfielder Pedri broke the deadlock from an early attack from the visitors.
Have Your Say! Can Xavi lead Barcelona back to the elite of European football? Tell us what you think here.
Barca continued to enjoy the lion's share of possession and opportunities in the encounter but Espanyol slowly grew back into the game and made it an attritional encounter.
The hosts endeavour and self-belief was rewarded five minutes before the break through a sensational strike from captain Sergi Darder.
The ball broke to the central midfielder just outside the area and he unleashed a pinpoint curling effort beyond Barca goalkeeper Marc-Andre Ter Stegen and into the far corner of the net.
Barca were unable to reassert their superiority having been pegged back in proceedings, although they did think they had retaken the lead just before the hour mark.
Teenage midfielder Gavi had the ball in the net but the goal was correctly overruled by VAR, which had spotted an offside in the build-up.
Barca were made to regret that call even further in the 64 th minute when they fell behind to a superb goal from the hosts as captain Darder this time turned provider.
The central midfielder provided a perfect delivery behind the visiting side's defence to find the in-form Spain international striker Raul de Tomas, who provided a sublime touch before showing composure to work the space for a shot and provide the finish.
From a Barca point of view, the goal was a disaster - defender Eric Garcia played de Tomas onside as he was caught several metres behind his defensive teammates and could not get back in time to make the block.
It was a particularly difficult evening for the former Manchester City defender, who had replaced the ever-impressive Ronald Araujo, who had sustained a knee injury, at half time.
Barca boss Xavi threw caution to the wind, as forwards Pierre-Emerick Aubameyang, Ousmane Dembele and de Jong were all introduced as they chased an equaliser.
There was time for late drama as both sides were reduced to ten men with Ribaudo and Pique both dismissed following an incident as the game ticked into six minutes of stoppage time.
It was substitute de Jong who headed home the last-gasp equaliser, nodding home a cross from Adama Traore in a deflating end to proceedings for Espanyol - who were a minute away from their first Catalan derby victory since 2009.
Barcelona had gone into the game with relative momentum having beaten Alaves and Atletico Madrid in their most recent La Liga matches.
Yet Atleti's last-gasp win over Getafe on Saturday night had seen Diego Simeone's side leapfrog Barca back into the top four and a Champions League place, while third-placed Real Betis also won at Levante on Sunday.