Udinese fought back from an early Leonardo Pavoletti goal to conclude the season in 12th place with a rare away victory.
Although Udinese were safe from relegation due to various permutations, their result here could still be important in calculating the overall order of the bottom three.
Marvin Zeegelaar was suspended for the visitors, who also had a long injury list including Jens Stryger-Larsen, Rodrigo De Paul, Antonin Barak, Seko Fofana, Valon Behrami, Nicolas Opoku and Sandro. The Sardinians missed Luca Ceppitelli and Paolo Faragò.
Juan Musso needed an early save on the Charalampos Lykogiannis free kick and Samir flung himself in the way of a Lucas Castro strike from a corner.
The Cagliari pressure paid off with the opener, as Udinese failed to clear a corner and Fabio Pisacane knocked it down for Leonardo Pavoletti’s header.
Teodorczyk almost pounced on a poor Joao Pedro back-pass and Ignacio Pussetto thought he had equalised on 54 minutes, but it was ruled offside using VAR on the Ter-Avest cross from the right.
Udinese kept pushing and Ter-Avest hit the woodwork as he came sliding in to meet a Teodorczyk low cross, but within 60 seconds the equaliser finally arrived.
It was a strange one, as Emil Hallfredsson seemed to be attempting a cross more than a shot, but it looped over Cragno and under the bar.
The visitors turned it around completely when Rolando Mandragora’s free kick found the head of defender Sebastien De Maio at the back post.
Samir’s defensive interception on a Valter Birsa free kick in stoppages risked an own goal, skimming the woodwork, while Musso pushed an Alberto Cerri header over.
Joao Pedro missed an extraordinary sitter with the last kick of the game, somehow failing to score from 12 yards.
See the latest Serie A predictions and betting tips with Eurotips.co.uk