Real Sociedad have moved into a Europa League spot having defeated Espanyol 2-1 at Estadio Anoeta in La Liga.
The visitors were ahead on 23 minutes when Jhon Cordoba found the back of the net following some fine individual work.
Ruben Pardo picked out Sergio Canales soon after, allowing the midfielder to get a shot in which deflected off Manuel Lanzarote en route to goal to make it 1-1.
Sociedad pushed for a second goal, and only a fine save from Kiko Casilla stopped them from taking the lead, when he reacted quickly to keep out Imanol Agirretxe's effort.
Claudio Bravo had to be equally alert at the other end of the field to deny Sergio Garcia, diving to keep out the striker after he was played through on goal.
It looked as though the contest was going to end all square, but then Carlos Vela struck in the first minute of added time to
ensure that Sociedad took all three points.