Two goals from striker Guillaume Hoarau led Young Boys to a shock 2-1 Champions League win over already-qualified Juventus on Wednesday to hand the Serie A side their first away defeat in a competitive match for over a year.
Cristiano Ronaldo missed several first-half chances for the Serie A side and hit the post while Paulo Dybala had a stoppage-time goal disallowed amid angry Juve protests.
Dybala, who had pulled Juventus back into the game with a goal in the 80th minute, thought he had equalised with a long-range shot, but it was chalked off for offside when Ronaldo leapt at the ball in front of goalkeeper Marco Woelfli but did not make contact.
Despite the defeat, Juventus, whose last away loss was to Sampdoria in Serie A in November last year, finished top of Group H with 12 points, two head of Manchester United who lost by the same score to Valencia.
The Swiss side finished bottom despite notching their first-ever win in the Champions League group stage.
Ronaldo saw a shot cleared off the line by Mohamed Ali Camara and then drilled an effort centimetres wide of the far post before Young Boys went ahead with a penalty on the half hour.
Alex Sandro, who had just replaced the injured Juan Cuadrado, lost possession to Nicolas Moumi Ngamaleu in the penalty area and then hauled down the Cameroonian player.
Juventus goalkeeper Wojciech Szczesny got his hand to Hoarau's penalty but it went in off the post.
Ronaldo then missed again, firing the rebound narrowly wide after Federico Bernardeschi's free kick hit the wall.
Ngamaleu also set up the second goal in the 68th minute, this time sliding a diagonal ball to Hoarau who cut inside Leonardo Bonucci and drilled a low shot into the corner from outside the area.
Substitute Dybala fired a low shot past Woelfli from Ronaldo's layoff with 10 minutes left to put Juventus back into the game.
As Juve threw everything forward, Ronaldo headed against the post from a narrow angle then Dybala saw his goal disallowed.