A thunderbolt from substitute Hernan Perez gave Espanyol a potentially vital 2-1 win over relegation rivals Rayo Vallecano on Monday.
Espanyol took the lead at Cornella-El Prat thanks to Abraham Gonzalez but were pegged back by Bebe in the second half after spurning a number of chances to double their advantage.
Just as a stalemate seemed likely, Perez blasted in following a corner to secure the victory which moves Espanyol five points clear of the drop zone, while Rayo remain level on points with 18th-placed Granada.
Rayo went into the game as the only current team in La Liga yet to lose away to Espanyol in the top flight, but that record came under threat when Abraham turned in Marco Asensio's cross after just 12 minutes.
Burgui side-footed wide when clean through on goal before Adrian Embarba hooked the ball off the line as Constantin Galca's side wasted a number of opportunities, and Bebe looked to have sealed a point when he cut into the area and lashed a shot into the far corner in the 67th minute.
But Perez's superb volley from the edge of the box with 13 minutes to play restored Espanyol's lead and, though Victor Sanchez was sent off late on for a second yellow card, they held out for three important points.