Dusan Vlahovic struck late to secure a 2-1 win for Juventus at Cagliari in Serie A on Saturday night.
Juventus needed a win to stay in touch with the top three and keep their remote title hopes alive, while Cagliari were after three points in order to move further away from the bottom three and survive in Serie A for at least another year.
The Sardinians got off to an excellent start when they took the lead after 10 minutes through Joao Pedro.
It appeared that Juventus would go in at half-time trailing, but former Ajax star Matthijs de Ligt levelled for the Old Lady just before the end of the first half.
Max Allegri had January signing Vlahovic to thank for the victory when he struck with around 20 minutes of the game left to play.
The Serbian struck with 75 minutes on the clock, and his move from Fiorentina continued to pay dividends as he scored his sixth goal in 13 appearances for his new club.
Juventus host Bologna next weekend, while Cagliari welcome Sassuolo on Saturday.