Andres Guardado struck a dramatic last-minute penalty to give Deportivo La Coruna all three points in a lively clash with Atletico Madrid, condemning the visitors to a third straight defeat under new coach Quique Sanchez Flores.
Deportivo have enjoyed an excellent start to the season and came into the game in fifth place in La Liga.
But they looked to be in trouble early on as Sergio Aguero struck after just three minutes to give Atletico a much-needed boost.
Miguel Angel Lotina's side came back into it when Diego Colotto equalised after 20 minutes and, just when the game appeared to be heading towards a stalemate, Pablo brought down Alberto Lopo and Guardado kept his cool after Atletico's fierce protests - which saw Cleber Santana sent off and Sanchez Flores race onto the pitch - to coolly fire the winner.
After taking over from the deposed Abel Resino, Sanchez Flores said he hoped Atletico would be in the top seven by Christmas.
But the former Valencia coach lost his first two matches in charge and Atletico remained in the relegation zone before this game.
Sanchez Flores was laid low by swine flu this week but recovered in time to take his place in the dug-out.
He left Diego Forlan on the bench after the Uruguay forward played in both World Cup play-offs for his national side against Costa Rica this week.
He was replaced in attack by Florent Sinama-Pongolle but it was his strike partner Aguero who set the visitors on their way with a fine strike after three minutes.
The Argentina forward robbed Lopo on the edge of the box and lashed a brilliant drive past Daniel Aranzubia to give Atletico the perfect start.
But that was to be the best moment of the evening for the visitors.
Depor equalised after 20 minutes when Colotto crashed a header past Sergio Asenjo from close-range following a corner.
The home side then looked to have won a penalty three minutes after the break, but the linesman had raised his flag for offside and Atletico breathed a sigh of relief.
But the Galicians were well on top now and bombarded Asenjo's goal throughout the second half.
Juan Rodriguez twice came close while Asenjo did well to save from Lassad Nouioui and Guardado almost grabbed the winner with two minutes left.
The Mexico winger was frustrated that time, but his chance would come soon afterwards as Deportivo were awarded a penalty in the last minute.
Cleber Santana protested and made a hole in the penalty spot, which earned him a booking, and the Brazilian was sent off shortly afterwards as he continued to dispute the referee's decision.
Sanchez Flores came onto the pitch and Aguero was furious with the fourth official as chaos reigned.
But it was to no avail as Guardado kept his cool to fire home the penalty.