Malaga qualified for the Champions League knockout phase as Group C winners despite a second-half comeback from hosts Zenit St Petersburg.
The points looked like they were heading in only one direction when the Primera Division side took a two-goal lead inside nine minutes - Diego Buonanotte opening the scoring and Sebastian Fernandez profiting from a goalkeeping error.
But Zenit fought back well and goals from Danny (49) and Viktor Fayzulin (86) earned them a 2-2 draw and a share of the spoils.
Zenit, who needed a win to have a realistic chance of progressing, started positively only to see Malaga take the lead with an efficient counter-attack in the eighth minute.
Fernandez broke free on the right hand side and quickly sent the ball into the box for Buonanotte.
He took a clever touch to take himself clear of Aleksandr Aniukov and then powered his shot past Viacheslav Malafeev.
If that was an early disappointment to the home side's hopes, what followed just a minute later was a hammer blow.
Malafeev was to blame, looking to play a short ball to Bruno Alves but only succeeding in gifting Roque Santa Cruz possession in a dangerous position.
The Paraguayan calmly found Fernandez in the centre and he converted with ease.
If they were shell-shocked the Russian side refused to show it and quickly started to piece together their response.
After an extended period of possession Alexander Kerzhakov reeled off a snap-shot that needed Willy Caballero to beat the ball away at the far post.
A couple of half-chances also came and went, Jesus Gamez' interception denying Danny, who sent his next opportunity wide after being played in by Hulk.
It took Zenit just four minutes of the second half to get on the scoreboard, Danny taking down Tomas Hubocan's cross with a neat touch before opening his body and finding the bottom corner with a delicate finish from six yards,
The equaliser should have arrived almost immediately. Kerzhakov defeated both Gamez and Caballero to leave himself a free shot on goal but, from a tight angle, slammed the ball into the side netting.
Malaga tested Malafeev with two free-kicks in the space of five minutes just after the hour mark, though neither Duda nor Jeremy Toulalan succeeded.
It looked as though Zenit would leave with nothing when Danny contrived to make a mess of his feet to completely botch an open-net from from a matter of inches - failing even to make proper contact.
But the ball was cleared only as far as Fayzulin at the edge of the area and he produced a cool finish to spare his team-mate's blushes.