Antoine Griezmann and Angel Correa scored to help Atletico Madrid reach the Copa del Rey quarterfinals 4-3 on aggregate despite dropping the second leg 3-2 to Las Palmas on Tuesday night.
With Atletico enjoying a 2-0 lead from the away leg, Griezmann opened the scoring at home four minutes after the break after a fine one-two with Nicolas Gaitan.
Las Palmas were able to equalise in the 58th minute when Marko Livaja shrugged off weak tackle from Diego Godin and lashed a shot inside the far post.
But Atletico responded three minutes later when Correa tracked down a long ball, dribbled into the box from the side and fired through the legs of goalkeeper Raul Lizoain.
Atletico appeared in control but let the lead slip away late when Livaja added his second of the night in the 89th minute, tapping in after good work from Mateo Garcia to race away on the wing.
And though the result of the tie was beyond doubt, Las Palmas caught Atletico napping on a free kick deep into stoppage time, Garcia receiving Jonathan Viera's pass and scoring his second at the near post with nearly the final play of the game.