Lazio survived a storming Napoli fight back, including a missed penalty, as they won 4-2 on Sunday to finish third in Serie A and qualify for the Champions League playoff round after both teams finished with 10 men.
Gonzalo Higuain scored twice as Napoli, needing to win to pip Lazio to third spot in coach Rafael Benitez's last game in charge, hit back from 2-0 down at halftime to equalise in a game in which both teams finished with 10 men.
Argentine Higuain then had a golden chance to send his team into the Champions League when they were awarded a penalty with 15 minutes left but he fired a wild effort over the bar.
Lazio took full advantage as Ogenyi Onazi and Miroslav Klose scored in the last five minutes before the silenced Stadio San Paolo emptied with astonishing speed.
Lazio finished their campaign on 69 points, with Fiorentina fourth after a 3-0 win over Chievo and Napoli on 63.
The final weekend produced 47 goals in 10 games, with Cagliari beating Udinese 4-3, Inter Milan overcoming Empoli by the same score and Torino thrashing Cesena 5-0.
Lazio appeared to be cruising after Marco Parolo scored with a deflected shot and Antonio Candreva pounced on Kalidou Koulibaly's mistake to send the visitors in 2-0 at halftime.
But Napoli suddenly found belief after Higuain tapped in Jose Callejon's low cross 10 minutes after the restart.
As the hosts increased the pressure, Lazio's Stefan de Vrij denied Dries Mertens an equaliser with a goal-line clearance and the visitors then had Parolo sent off for a second bookable offence in the 62nd minute.
When Mertens cleverly set up Higuain to level two minutes later the momentum was clearly with Napoli but they self-destructed in a manner painfully familiar to their fans.
Faouzi Ghoulam was booked twice in seven minutes, both for reckless and unnecessary tackles, and was sent off in the 70th.
Then Higuain missed his penalty 14 minutes from time although replays suggested it should not have been awarded in the first place as there did not seem to be any real contact when Christian Maggio went down in the area.
Napoli's heads dropped and when substitute Onazi finished off a counter-attack it was all over, with former Germany forward Klose adding the finishing touch in stoppage time.
Inter's Mauro Icardi scored twice in their win to finish as joint Serie A top scorer on 22 goals alongside 38-year-old Luca Toni of Verona, who netted in their 2-2 home draw with champions Juventus on Saturday.
Second-placed AS Roma lost 2-1 at home to Palermo in their final game.