Jonathan Viera sealed three points from the penalty spot with virtually the last kick as Las Palmas moved up from 11th to seventh with a 1-0 victory over Eibar in Gran Canaria.
Las Palmas were in the ascendancy in the first period while Eibar enjoyed the better of it in the second period but the hosts emerged victorious when Roque Mesa was clipped by Eibar's French defender Florian Lejeune as he burst into the box and Viera made no mistake from 12 yards.
Las Palmas came into the match in buoyant mood after last week's stunning comeback to claim a point in a 3-3 draw here against Celta Vigo, and they almost took an eighth-minute lead when Sergio Araujo's header from a Dani Castellano cross struck the outside of the post.
Eibar goalkeeper Asier Riesgo kept out a 13th-minute free kick from Viera and also held on well to a powerful low shot from Kevin-Prince Boateng in the 20th minute.
Riesgo tipped over another effort from Viera after half an hour after he checked back onto his left foot and aimed a shot on goal from an acute angle.
Eibar raised their game in the second period and it took a smart stop from Raul Lizoain to deny Pedro Leon's 63rd-minute shot.
Substitute Gonzalo Escalante headed wide from a right-wing corner in the 88th minute and it was a miss which was to prove costly for the visitors when Las Palmas won, and converted, a 94th-minute penalty.