A second-half hat-trick from German Denis saw 10-man Atalanta confound Inter Milan in a frenetic Serie A game at San Siro.
Inter's task was to chase Fiorentina out of fourth place and move closer to the Champions League places and, in a tame first half, veteran Tommaso Rocchi opened his account for the club to send them on their way.
Giacomo Bonaventura's response appeared to be a minor setback as substitute Ricky Alvarez, on for the injured Antonio Cassano, scored twice inside four minutes.
Denis would go one better, though, the Argentinian adding two classy goals to a dubious penalty to fire Atalanta into 13th place and leave the home faithful in stunned silence.
A late red card for Cristian Raimondi offered a glimmer of hope for Inter but Andrea Ranocchia's point-blank miss left his side in fifth and clinging on to Europa League football.
A lethargic start completely betrayed what would transpire in the second half.
Fredy Guarin was first to find the target, testing Ciro Polito with a powerful drive, before his cross found Rocchi who headed wide.
Cassano and Rocchi were slowly starting to build an understanding when the former pulled up in the 32nd minute.
He could not continue and Alvarez was introduced to form an unorthodox partnership with Inter's only remaining fit striker.
It was not a promising start for Alvarez, though, who somehow managed to miss an open goal from a spilled Alvaro Pereira shot.
Inter would make the breakthrough, however, in the 43rd minute.
It had been 431 days since Rocchi had scored his 99th goal in the top flight but, from a corner, the veteran beat Guglielmo Stendardo to head home his 100th in Serie A.
Atalanta introduced on-loan Inter striker Marko Livaja following the restart and the tactical switch lit the touchpaper on an unfathomable second half.
With 56 minutes on the clock, Livaja found a hole in the hosts' backline to find Bonaventura, who slotted the ball beyond Samir Handanovic.
Inter were unfazed, though, and Alvarez promptly slipped past Michele Canini to beat the onrushing Polito.
The 24-year-old was fired up and three minutes later he doubled Inter's lead. This time he bamboozled Stendardo to scream a daisy-cutter into the back of the net.
There was barely time to take stock of Alvarez's quickfire brace when Atalanta turned the game on his head in a 12-minute spell.
It was not clear who had committed the foul in the Inter box when referee Andrea Gervasoni pointed to the spot in the 65th minute, but Denis was not complaining when he sent Handanovic the wrong way.
His second goal was all his own work six minutes later, with the former Napoli man dusting off Andrea Ranocchia to rifle the ball home.
It was a low moment for Inter but in the 77th minute hush descended at San Siro as a bullish Denis smashed home Bonaventura's right-wing cross in front of the home fans.
Alvarez had seen his thunder well and truly stolen by his countryman and his desperate bid to force the draw flashed across the goalmouth.
Raimondi's stoppage-time dismissal for elbowing Ezequiel Schelotto left Atalanta at a brief disadvantage, but Ranocchia's improbable scooped shot from a yard out was not the killer blow Inter needed.