The hosts had taken control of the all-Primera Division tie thanks to goals from Sergio Sanchez, Vitorino Antunes and Juanmi.
Roberto Torres and Manuel Onwu made it 3-2 but Osasuna's comeback appeared to have stalled with the 64th-minute sending off of Raoul Loe.
Emiliano Armenteros scored again for the 10 men, though, to make it 3-3 before the numbers were evened out by Nacho Camacho's dismissal for Malaga with six minutes to go.
Valencia were held to a goalless draw at Gimnastic, and finished a man down due to Jonas' late red card, while a Odion Ighalo double gave Granada a 2-0 win at Alcorcon.
Top-flight Espanyol could only manage a 2-2 draw at Segunda Division strugglers Jaen.
David Lopez put the Catalan visitors ahead on the stroke of half-time only for a Sidnei own goal and a Jozabed goal to turn the match on its head.
Christian Stuani grabbed Espanyol's equaliser with two minutes to go.
Almeria had no such troubles with a 3-1 win at Las Palmas.
An Oscar Diaz brace, the second from the penalty spot, either side of an Alex Vidal goal put the mainlanders in control before Nauzet Aleman pulled one back for the Gran Canaria club.