Cristiano Ronaldo scored two penalties to take his Champions League goal tally to 134 as Juventus beat a "scared" Barcelona to seal top spot in Group G.
Ronaldo sent Marc-Andre ter Stegen the wrong way after being fouled by Uruguay defender Ronald Araujo.
Juve doubled their lead through Weston McKennie's bicycle kick before Ronaldo added his second from the spot after Clement Lenglet handled.
"We weren't aggressive," said Barca boss Ronald Koeman.
"It looked as if we'd come out looking not to lose, as opposed to trying to control the game. We weren't good, not even positionally.
Watch highlights of the match below;
"We looked scared."
It is Barcelona's first defeat in a group game since 2016.
They started the day with a three-point cushion over Juve but finish second and will be unseeded in Monday's last-16 draw.
Barcelona forward Lionel Messi and Ronaldo, regarded as the two greatest players of their generation, were facing one another for the first time since May 2018.
While Ronaldo scored two, Messi was frustrated by 42-year-old Juve keeper Gianluigi Buffon, who made a string of fine saves.