Espanyol beat Rayo Vallecano 3-2 thanks to substitute Christian Stuani's injury-time winner on Sunday, earning the struggling side their first victory in eight rounds of the Spanish league season.
Espanyol midfielder Joan Verdu made up for his early error that led to Leonardo Carrilho's 11th-minute opener by scoring from a long pass by Victor Sanchez in the 37th before adding a second goal three minutes after half time.
Carrilho got his own brace in the 63rd, and the teams looked set to split the points with both reduced to 10 men after Rayo's Mikel Labaka and Espanyol's Diego Colotto were sent off.
But fellow substitute Sergio Garcia, making his debut after returning from injury, picked out Stuani with a cross for the striker to head home and grab the much-needed win for Espanyol.
Also on Sunday, Miguel "Michel'' Alfonso struck from long range three minutes from time to give Levante a 1-0 victory at Getafe.
Getafe had shown more scoring intent at Alfonso Perez coliseum, but Levante's defence held firm until Michel went on as a substitute in the 73rd and hit a looping effort from 25 metres out over the goalkeeper to grab the three points.
It was Levante's first away win after losing their first three outings away from Valencia to start the season.
"It was a pretty goal. I saw the ball and wanted to shoot right away because I hadn't had a shot in the entire game,'' said Michel.
"A draw would have been fair, but the game was decided with that one shot.''
On Saturday Lionel Messi scored a hat trick to lead Barcelona to a wild 5-4 win at Deportivo La Coruna, after Real Madrid did just enough to ease to a 2-0 victory over Celta Vigo.
Valencia, meanwhile, rallied to beat 10-man Athletic Bilbao 3-2, while Malaga come from behind to down Real Valladolid 2-1.