Palermo pipped Carpi to Serie A safety thanks to a thrilling 3-2 win over Verona at the Renzo Barbera.
Carpi entered Serie A's final day needing to better Palermo's result, but a 2-1 win at Udinese was in vain as the Rosanero edged a thriller to end a season in which they have employed six different head coaches with salvation.
Franco Vazquez and Enzo Maresca scored either side of Federico Viviani's stunner to send the Sicilian fans wild and condemn Carpi to relegation in their first Serie A campaign.
Both games began with understandable nerves, but Italy international Vazquez got the ball rolling with a clipped finish from 20 yards - a goal celebrated with a huge bundle.
Giampaolo Pazzini almost lobbed home goalkeeper Stefano Sorrentino as already relegated Verona gave it their all, but the game took a huge twist as both sides had a man dismissed - Michel Morganella and Pawel Wszolek each seeing red for a clash in which it appeared the Palermo man was the aggressor.
At the same time in Udine, Carpi were awarded a penalty as Kevin Lasagna was felled in the box, Simone Verdi coolly stepping up to convert. The home team's frustrations boiled over as Cyril Thereau was dismissed for berating the referee before the game was resumed.
Verdi then doubled his tally with a wonderful solo effort and, in Palermo, Artur Ionita hit the post as the hosts' hopes hung by a thread.
And though Viviani briefly levelled the scores to put Palermo in peril, headers from Maresca and top scorer Alberto Gilardino put the home side's destiny firmly in their own hands, although Eros Pisano's late goal ensured nerves were frayed until the end.
In Udine, there was just enough time for the home fans to give one last ovation to retiring club legend Antonio Di Natale, who emerged from the bench late on and converted a penalty with his first touch to bring a party atmosphere to the Friuli that did not suit the visitors.
Di Natale was not the only veteran striker to bow out of Serie A with a goal, Miroslav Klose also scored a penalty as Lazio were beaten 4-2 by Fiorentina, a result that secured Europa League qualification for the Viola.
Fiorentina had only won once in their previous 10 games, but Matias Vecino (two), Federico Bernardeschi and Cristian Tello struck after Senad Lulic's opener for the hosts.
The Stadio Olimpico faithful were keen to commemorate Klose's final day with the club, their fans holding up pictures of all of the German's 53 previous Serie A strikes for Lazio.
Atalanta beat Genoa 2-1, Empoli overcame Torino by the same scoreline and Chievo versus Bologna finished goalless in a trio of games earlier on Sunday, with nothing but mid-table positioning riding on them.