BARCELONA, Spain (AP) -Malaga came from behind to beat Rayo Vallecano 4-2 through Jose Rondon's double to stay in the hunt for a top-four finish in the Spanish league on Thursday.
Diego Costa stroked in a spot kick to give Rayo the lead five minutes in after Malaga defender Jesus Gamez fouled Emiliano Armenteros in the area.
But Malaga dominated the rest of the way at La Rosaleda Stadium.
Rondon headed home Eliseu Pereira's cross to equalize in the 35th. The Venezuela striker then netted again in the 58th when he took Eliseu's pass, held off his marker, and shot under the goalkeeper for his ninth goal of the season.
Substitute Enzo Maresca put the result beyond doubt for the hosts with a header in the 70th.
Roberto Trashorras scored Rayo's second with a penalty in the 84th after goalkeeper Willy Caballero brought Diego Costa down in the box, but two minutes later Malaga substitute Sergio "Duda" Barbosa hit from long range.
Malaga's fourth win in a five-game unbeaten streak lifted it even on points with fourth-place Levante, the team currently holding Spain's last Champions League spot.
"More than good results, we are looking to perfect our playing style," Malaga coach Manuel Pellegrini said. "If the team continues in this dynamic we can aspire to the highest possible positions. We have never lacked ambition."
Earlier, Sevilla revived hope of a late-season surge by beating Racing Santander 3-0 thanks to Manu del Moral's brace, while Walter Pandiani's stoppage-time goal earned Espanyol a 1-1 draw at Real Betis.
Spain winger Jesus Navas volleyed in Sevilla's 34th-minute opener. Manu extended the lead by firing under the goalkeeper in the 52nd and capped the win in added time.
Racing played the last 10 minutes a man down after Papakouly Diop was sent off with a direct red card for a hard tackle.
"This was a great game for Sevilla," said Sevilla coach Michel Gonzalez. "But you also have to consider the low morale of the team we were facing. That played in our favor."
Sevilla's first win in four games left it four points from sixth place and Spain's Europa League positions with 10 games to go.
Racing is four points from safety after its 10th straight match without a victory.
In Seville, Betis looked set to make good on Ruben Castro's 10th goal of the season until Pandiani rifled a shot from outside the area just under the bar to split the points.
"I felt that the game was unfairly slipping away from us, but (Pandiani) scored because we never gave up," said Espanyol coach Mauricio Pochettino.
On Wednesday, Real Madrid coach Jose Mourinho, assistant Rui Faria, and two players were all sent off during its 1-1 draw at Villarreal. The league leader's second straight draw reduced its advantage to six points over Barcelona.
Lionel Messi became Barcelona's all-time leading scorer with 234 goals by hitting a hat trick in Tuesday's 5-3 win over Granada.
Also in round 28, it was: Osasuna 0, Getafe 0; Real Sociedad 1, Levante 3; Valencia 1, Zaragoza 2; Atletico Madrid 2, Athletic Bilbao 1; and Sporting Gijon 2, Mallorca 3.