Two goals from Mesut Ozil helped Real Madrid twice come from behind against Real Valladolid before finally running out 3-2 winners.
The hosts surprised everyone by taking the lead after just eight minutes when Patrick Ebert's cross created havoc in the Madrid box, allowing Manucho Goncalves to tap in from close range.
Madrid were level just four minutes later, however, when a mistake by Omar Ramos gifted the ball to Jose Callejon, who squared it to Karim Benzema to tap home.
Valladolid were not about to be brushed aside, however, and regained their shock lead after 22 minutes, Manucho again finding the back of the net, this time with a header.
The champions probed for another equaliser and eventually found it on the stroke of half time when Benzema found Mesut Ozil inside the box, and the German made no mistake with his finish.
Madrid thought they had taken the lead 25 minutes from time when Sergio Ramos put the ball in the back of the net, but the Spaniard was called back for offside. However, replays suggested that the Madrid man was on.
They wouldn't have to wait too much longer to make it 3-2, however, as Benzema won a free kick on the edge of the Valladolid box. Ozil stepped up and bent it into the top corner to give his side the lead for the first time in the match.
Madrid almost made it 4-2 four minutes from time when Ozil's cross was met by Ramos, but the defender's effort was well saved by Daniel Hernandez.
The result puts Madrid eight points behind league leaders Barcelona in the La Liga table.