Fiorentina moved into fourth place in Serie A as Manuel Pasqual's last-minute goal gave them a precious 3-2 victory over Atalanta BC.
The away side took the lead inside the opening 10 minutes when Papu Gomez's back-post cross was met by Davide Zappacosta, who planted his header beyond Ciprian Tatarusanu.
Gomez's long-range strike was then beaten away by Tatarusanu, before Fiorentina equalised against the run of play when Jose Maria Basanta nodded home from Matias Fernandez's free kick.
Alessandro Diamanti then curled an effort narrowly wide and Basanta volleyed wastefully over the top as Vincenzo Montella's side began to control the game.
Mario Gomez thought that he had put his side ahead within five minutes of the restart, but saw his effort ruled out for offside, before Marco Sportiello turned Diamanti's goal-bound effort around the post just after the hour mark.
Diamanti then popped up to restore Fiorentina's lead when he collected the ball on the edge of the Atalanta area and drove into the box to place a shot beyond Sportiello.
With just seven minutes remaining, Richmond Boakye looked to have rescued a point for Atalanta when he slid in at the back post to convert Zappacosta's cross.
However, Pasqual stroked home Fernandez's cross to rescue all three points for Montella's men in the dying seconds.