Alex Menendez scored a 93rd-minute winner for Sporting Gijon to snatch all three points at the death from Espanyol.
It was the visitors that started the game brightly, as some deep pressure from the Sporting front line forced the defence into a poor clearance, with the ball finding its way to Alen Halilovic, who curled his left-footed effort from outside of the box past the helpless Pau Sabata.
The goal was the Croatian teenager's first La Liga goal and was well-deserved, as Sporting had been the better of the two sides.
However, Espanyol were awarded a penalty 20 minutes later, after Bernardo Espinosa brought Felipe Caicedo down in the box, earning the centre-back a yellow card for the foul.
Caicedo was unable to convert the penalty after Alberto Garcia Cabrera guessed the correct way and forced the shot out to be cleared away from danger.
It wasn't until a quarter-of-an-hour into the second half that the game burst back into life, as the visitors had the chance to make it 2-0 and put the game out of reach.
The chance came from a corner as it fell to Roberto Canella, who then curled a low-driven pass through to Antonio Sanabria, who was open in a lot of space inside the six-yard box but the striker missed the target from close range, as his effort hit the bar and the chance went begging.
From that missed chance, the hosts raced up the opposite end and Caicedo equalised by prodding the ball home, after some neat footwork from Ruben Duarte opened up some space for the defender to put in a menacing cross.
The game died down until the last minute of added time, as Menendez latched onto a horizontal through-ball and then had time to strike it past the oncoming keeper to take all three points and condemn Espanyol to a home defeat.