Former Fiorentina striker Pablo Daniel Osvaldo, headed in a corner in stoppage time.
Milan: Fiorentina's Champions League hopes diminished as a late goal meant it lost 1-0 at home to Roma in the Serie A on Saturday, in a match where it hit the woodwork twice.
Former Fiorentina striker Pablo Daniel Osvaldo, who scored a hat trick in last weekend's 4-0 win against Siena, headed in a corner in stoppage time.
The result left Fiorentina one point behind AC Milan in the race for third place and the final Champions League spot. Milan host Torino on Sunday.
"It's a bitter defeat, we were playing for a very important third place," said Fiorentina manager Vincenzo Montella, who used to play and coach Roma. "I am very disappointed, the lads didn't deserve to lose, in fact I have congratulated them.
"But that's football. We still have goals to achieve, we start again tomorrow. Milan has to play tomorrow and still has to face Roma. Naturally we have less chance now but there will only be one win difference between us if it's a draw tomorrow."
Roma kept its Europa League hopes alive as it moved three points behind Fiorentina and four above Udinese, which entertains Sampdoria in Sunday's lunchtime kickoff.
"We won away from home against a great team, which means a lot," Roma captain Francesco Totti said. "We were facing one of the strongest teams, playing here isn't easy.
"The result rewarded us for our hard work, the season isn't over. We'll enjoy this victory and think about the Europa League, which is our target."
Fiorentina should have taken the lead seven minutes from halftime after Alberto Aquilani's shot rebounded into Stevan Jovetic's path, but Roma goalkeeper Bogdan Lobont did brilliantly to fingertip the Montenegro striker's effort onto his right post.
Lobont, standing in for the injured Maarten Stekelenburg, had to be replaced by Mauro Goicoechea during the interval after breaking his nose in the first half in a collision with Gonzalo Rodriguez.
Fiorentina upped the pressure in the second half and Adem Ljajic twice went close before the hour, only to see one effort fly just over the crossbar and another well saved by Goicoechea.
From the resulting corner, David Pizarro drove millimeters past the left post.
Pizarro almost won it at the death but his long-range effort crashed off the top of the left upright. Osvaldo scored the winner moments later.
Chievo Verona is all but certain of playing Serie A football next season after inching closer to survival with a goalless draw at home to Cagliari.
Cagliari almost got off to the perfect start when Marco Sau beat the offside trap to race clear on goal but Chievo goalkeeper Christian Puggioni did well to parry his powerful shot.
Chievo had the best chance of the match shortly before halftime. Nicolas Frey nodded on Cyril Thereau's cross to Boukary Drame, whose fierce volley was well parried by Cagliari goalkeeper Michael Agazzi.
Radja Nainggolan almost won it for Cagliari at the death, with a long-range screamer which flew just past the left post.
Udinese beat Sampdoria 3-1 on Sunday as a double from captain Antonio Di Natale kept alive their hopes of qualifying for the Europa League. Di Natale scored his first in the 29th minute, gathering with his back to goal, spinning and firing into the bottom right corner.
Eder leveled just five minutes later with a strike from outside the area into the far corner. Di Natale restored Udinese's lead seven minutes after the break, volleying in off the underside of the crossbar for his 20th league goal of the season. It is the fourth successive year the striker has reached that milestone.