A late goal from Daniele Conti saw Cagliari snatch a 2-1 win at home to Torino and end a run of three successive defeats in Serie A.
The midfielder had also given the hosts a first-half lead but a draw seemed the most likely result following Ciro Immobile's equaliser, until Conti struck again two minutes from time.
It was only the second win in 11 matches for Cagliari but lifts them above Torino - who remain without a victory since September 22 - in the standings.
Looking to make home advantage count at the Stadio Sant' Elia, Cagliari threatened after 11 minutes with a shot from Victor Ibarbo which cleared the crossbar.
Immobile produced Torino's first opening on the half hour but saw his effort blocked by goalkeeper Vlada Avramov, with the striker then firing wide a few minutes later.
However, Cagliari delivered a sucker-punch on the stroke of half-time with Conti picking out the top right corner with a delicious free-kick.
Torino looked to respond on the resumption, although Avramov was alert to a dangerous free-kick from top scorer Alessio Cerci.
But the scores were level after 52 minutes thanks to Immobile, who latched on to a ball from Omar El Kaddouri before planting a low drive beyond the reach of the Cagliari goalkeeper.
Cagliari immediately stepped up their efforts and Marco Sau saw a shot saved by Torino keeper Daniele Padelli before Radja Nainggolan tried a speculative shot from distance which flew past a post.
Padelli came to the rescue once more nine minutes from time with Belgian midfielder Nainggolan hoping to make his mark from the edge of the area.
Instead it was Conti who earned the plaudits in the final two minutes with another sublime free-kick which left Padelli stranded.