Gareth Bale scored four goals as Real Madrid hit nine-man Rayo Vallecano for double figures in a remarkable game.
Real trailed before Tito's red card - Danilo putting the hosts ahead before headers from Antonio Amaya and Jozabed.
Bale levelled with a header before Raul Baena was sent off in conceding a penalty which Cristiano Ronaldo scored.
As the game opened up, Bale added three more, Ronaldo scored a second and Karim Benzema netted a hat-trick - including number 10.
Relive the excitement as it happened
Real boss Rafael Benitez has been under pressure after losing three of their last five La Liga games.
But it remains to be seen if the farcical circumstances of their win over neighbours Rayo will ease much of that, as they were playing poorly before the sendings off.
Real remain two points off leaders Barcelona and Atletico Madrid, who both have a game in hand.