Christian Stuani scored a last-minute winner for Espanyol as they claimed a 2-1 victory over 10-man Granada on Sunday.
Felipe Caicedo opened the scoring for the hosts before the break with Youssef El Arabi levelling for Granada in the 61st minute.
El Grana defender Juan Carlos was sent off in the 82nd minute after picking up his second yellow card of the match, giving Espanyol an advantage and Stuani netted from close range with 30 seconds left on the clock.
The result means Granada are now winless in their last 11 Primera Division games while Espanyol bounced back from their 5-1 drubbing by Barcelona to claim two league wins from their last three.
There were chances for both sides in the first half and Piti saw his 11th-minute strike tipped around the post by Espanyol keeper Francisco Casilla before Anaitz Arbilla headed over the bar from close range shortly afterwards at the other end.
Granada's El Arabi had two headers saved by Casilla as the visitors started to apply some pressure as the first half reached its midway point, but soon after it was Caicedo that broke the deadlock.
The Ecuador international found the net from close range in the 34th minute to give Espanyol a 1-0 lead at the break.
Espanyol striker Sergio Garcia de la Fuente came agonisingly close to doubling the hosts' lead 10 minutes into the second half when his strike hit the bar from 20 yards.
However, it was Granada who found the net when El Arabi turned in Piti's cross from inside the six yard box shortly after the hour mark.
Salva Sevilla went close with a header for Espanyol in the 71st minute as the home side looked to restore their lead, and Juan Carlos gave them a helping hand when he was sent off for his second bookable offence in the 82nd minute.
The extra man paid dividends for the Barcelona-based side when Stuani scored a last-gasp winner from close range after being set up by Lucas to claim all three points.