Real Madrid's season ended in disappointment as their hopes of securing the Primera Division title evaporated.
Manuel Pellegrini's side came into the match needing victory and hoping old rivals Barcelona slipped up against Real Valladolid but neither eventuality came to pass, with a disappointing draw at the Estadio La Rosaleda combined with a crushing, title-winning 4-0 win for the Catalonians.
Duda gave Malaga the lead inside 10 minutes as the script went wrong almost immediately and although Rafael van der Vaart equalised early in the second half, goalkeeper Gustavo Munua denied them the win as Malaga survived the drop by a single point.
Malaga stated their intentions to wrest the limelight from Real as early as the third minute when Javi Lopez drilled a 20-yard effort at goal and drew a smart reaction save from Iker Casillas.
Real quickly settled after that early scare, with Xabi Alonso attempting to take control of the midfield area.
Rafael van der Vaart was also looking to get into the game and he gave Munua an early test when he shot powerfully from the left channel. Munua responded with a calm save.
The next opportunity saw Malaga take the lead with a brisk attack that caught the Real defence cold.
After a break down the right flank Felipe Caicedo's quick thinking released Duda with a defence-splitting back heel which the Portuguese took in his stride before slotting calmly past Casillas.
Jesus Gamez earned himself a booking, the first of the match, for a foul on Cristiano Ronaldo as Real attempted to hit back in quick time.
The resulting free-kick was whipped in by Esteban Granero from the left flank but Munua met it conclusively to punch to safety.
Gonzalo Higuain was next to try his luck for the visitors, powering a right-footed effort wide of the post from the edge of the area.
Real continued to press and Ronaldo, drifting in and out of proceedings, almost made it 1-1 in the 25th minute.
Sergio Ramos was the provider, finding the £80million winger six yards out.
Munua, though, was on hand with a fantastic save to tip the ball round the post.
Malaga remained solid in defence as the pressure mounted, Helder Rosario clearing the resulting corner.
Duda was handed a chance to claim a second when Ramos hauled down Caicedo 25 yards out, but his free-kick failed to hit the target.
Chances were coming at both ends of the pitch by now, Van Der Vaart going close with one of the more spectacular attempts, an overhead kick from 12 yards.
The Dutchman should have done better with a much simpler effort in the 35th minute but failed to draw a save from six yards.
Ramos missed from similar distance and Van der Vaart warmed Munua's hands with a curling free-kick but there was no second goal before half-time.
The lively Van der Vaart eventually found the net two minutes into the second half, converting Marcelo's pass from the left of the area.
On the hour, Van der Vaart went close again with a shot from distance and a minute later Ramos nodded Granero's corner over the crossbar.
By now Malaga were struggling to contain their opponents and it was only the continued efforts over Munua that denied Granero moments later.
The Uruguayan goalkeeper continued to preserve parity with further saves from substitute Karim Benzema and the ever dangerous Van der Vaart, while Selim Benachour almost stole it for Malaga nine minutes from time.
The draw, while academic for Real's title bid, helped Malaga finish a point above the relegation zone.