Substitute Douglas Costa scored an exquisite stoppage-time goal to give Juventus a 2-1 win away to Lokomotiv Moscow on Wednesday, which clinched their place in the Champions League round of 16 with two games to spare.
The Brazilian collected the ball outside the area and raced past three defenders, exchanged passes with Gonzalo Higuain who backheeled the return to him and then left two more players in his wake before beating goalkeeper Guilherme to silence the Lokomotiv stadium.
Juventus top Group D with 10 points, three ahead of Atletico Madrid who are away to Bayer Leverkusen later on Wednesday while Lokomotiv have three points and Leverkusen none. The Serie A champions remain unbeaten in all competitions under Maurizio Sarri who took over during the close season.
Guilherme had gifted Juventus the lead after four minutes when he allowed Cristiano Ronaldo's powerful free kick from an unlikely position near the touchline to squirm through his legs before Aaron Ramsey touched the ball over the line.
Juventus forward Cristiano Ronaldo was substituted in the second half for Paulo Dybala after feeling a twinge in his knee, according to Juventus coach Sarri.
"He's been feeling it for a few days and I preferred to take him off to avoid running any risks, even though he was angry," Sarri said.
"It wasn't one of our best performances. We allowed the opposition to win too many balls, we were too open in the first half and in the second we were too slow in moving the ball around."
Aleksei Miranchuk levelled eight minutes later for the Railwayman, scoring from the rebound after his own header hit the post.
On a rainy Moscow evening, Guilherme then atoned for his mistake by making two saves in quick succession from Higuain.
The Brazil-born goalkeeper was almost caught out after another Ronaldo free kick bounced awkwardly in front of him early in the second half but then made another brilliant save to turn away the Portuguese forward's powerful drive.
Far from outclassed, Lokomotiv nearly went ahead in the 78th minute but Joao Mario saw his shot cleared off the line by Leonardo Bonucci with goalkeeper Wojciech Szczesny caught out of his ground.
In the end, Sarri's substitutions paid off as Juventus took all the points thanks to an inspired moment from Costa.
"We had chances to win this game and I think I would have been happy with a draw," said Lokomotiv's 72-year-old coach Yuri Semin, who is in his fourth stint in the job. "We played a really good match, defended well, but it was still not enough in the end."