Malaga were unable to hold off a second-half fightback as they drew 3-3 with 10-man Osasuna in the first leg of their Copa del Rey tie.
The hosts opened the scoring on the half-hour mark when Sergio Sanchez rose to head the ball past goalkeeper Asier Riesgo into the corner of the net.
Los Boquerones doubled their advantage seven minutes before the break thanks to a 30-yard free kick from Vitorino Antunes.
The tie looked to have been put beyond Osasuna when Juanmi fended off two challenges inside the penalty area before slotting the ball past Riesgo.
However, the visitors fought back with two goals in four minutes from Roberto Torres and Manuel Onwu, which seemed to have reignited the contest.
Osusuna's hopes of drawing level were dealt a blow midway through the second half when Raoul Loe was sent off for a second bookable offence after his challenge on Eliseu.
However, they did manage an equaliser when Emiliano Armenteros picked up a loose ball on the edge of the penalty area before sliding his shot past Willy Caballero.
Malaga's nightmare second half was complete when Ignacio Camacho was sent off for a poor tackle on Alvaro Silva.
The game ended in a draw, which gives Osasuna a chance of making the last 16, should they win the return leg in Pamplona a week on Tuesday.