Striker Angel Rodriguez came off the bench early in the second half to score the winner on a breakaway in the 78th minute at the Coliseum Alfonso Perez Stadium. The win kept Getafe one point in front of fifth-placed Sevilla, and four points ahead of sixth-placed Valencia in a tight race.
Getafe hasn't finished better than sixth in the league since 2010. It was 10th or worse since then until an eighth-placed finish last season. Founded in 1983, Getafe has been in the top flight since 2005 with the exception of the 2016-17 season.
"We will keep going step by step," Rodriguez said. "We still have to face some tough opponents. We know how difficult it's going to be." Getafe, which still has matches against Sevilla, Real Madrid and Barcelona, had entered the weekend only four points in front of eighth-placed Athletic, which was carrying the momentum from three straight victories, including one against second-placed Atletico Madrid.
Sevilla stayed close to Getafe by beating Valladolid 2-0 with two late goals for its fourth win in the last five league matches. Roque Mesa scored in the 84th and Munir El Haddadi sealed the away victory in stoppage time at the Jose Zorrilla Stadium.
"It's a very gratifying win," Mesa said. "We knew it was going to be hard as most teams are playing for something at this stage of the competition. We will keep fighting until the end to try to secure this Champions League spot."
Valencia lost ground after being stunned by relegation-threatened Rayo Vallecano on Saturday, seeing its 17-game unbeaten streak in all competitions come to end. Alaves, which has been close to fourth place the entire season, stayed seventh after conceding a stoppage-time equalizer in a disappointing 1-1 home draw against Leganes on Sunday.
Jonathan Calleri put the hosts ahead by converting a first-half penalty kick but Jonathan Silva evened the match in the third minute of injury time with an impressive angled shot from outside the area. The ball curled over goalkeeper Fernando Pacheco and struck the far post before going in.
"Football games last 95 minutes and it can be cruel with an ending like this," Alaves coach Abelardo Fernandez said. "You see yourself close to triumph and then you get stunned by a goal that you can't do anything about."
At the top of the standings, Barcelona moved closer to its eighth Spanish league title in 11 seasons by beating Atletico 2-0 at Camp Nou Stadium on Saturday, opening an 11-point lead with seven matches remaining.
Real Madrid stayed safely in third with a 2-1 win over Eibar at the Santiago Bernabeu Stadium on Saturday, keeping a 10-point gap to Getafe. Real Madrid is two points behind Atletico. OTHER RESULTS Celta Vigo escaped the relegation zone with a 3-1 come-from-behind home win over Real Sociedad thanks to a pair of goals by Iago Aspas.
Villarreal dropped into the bottom three after a 2-1 loss at ninth-placed Real Betis. Villarreal midfielder Santi Cazorla missed a penalty kick a few minutes from the end at the Benito Villamarin Stadium in Seville.
Levante was held by last-placed Huesca to a 2-2 home draw.
More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports
Tales Azzoni on Twitter: http://twitter.com/tazzoni