Images from the Champions League matches played on Wednesday
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.
CSKA inflict heaviest ever home European defeat on Real Madrid
Real Madrid suffered their heaviest ever home defeat in Europe on Wednesday when the already-qualified Spaniards were thumped 3-0 at the Santiago Bernabeu by CSKA Moscow in the Champions League.
The Russian side's remarkable victory, however, was still not enough to secure them a spot in the Europa League as they were pipped to third place in Group G by Viktoria Plzen.
Feder Chalov put CSKA in front against the group winners and triple Champions League holders with a curling shot in the 37th minute and Georgi Shchennikov doubled the visitors' advantage two minutes before halftime with a scrappy volley on the rebound.
Iceland international Arnor Sigurdsson struck a remarkable third goal for the Russians in the 73rd minute, completing an unlikely second victory for CSKA over Madrid in this Champions League campaign and provoking loud boos and whistles from the unhappy home supporters.
CSKA's only two wins in the competition this season have come against the 13-times winners and they finished bottom of the group on seven points due to their inferior head-to-head record against Plzen, who beat AS Roma 2-1.
Real, who were already guaranteed top spot, remained on 12 points while Roma, who had clinched second place in the group, ended on nine.
Madrid coach Santiago Solari made seven changes from the side who had scraped a 1-0 victory over La Liga basement club Huesca on Sunday, including handing winger Vinicius Jr. and defender Javi Sanchez their first starts in the Champions League.
"It was important to give the young players and those coming back from injury a chance to play but we did not expect this result," Solari told reporters.
"I took risks with the starting lineup we played and I take responsibility for that. We weren't convincing in our box or the opposing area but they were and that's why the game turned out how it did."
CSKA also won 1-0 in the Russian capital in October when Julen Lopetegui was in charge of the Spaniards, a result which sparked the beginning of the end for the Spanish coach's brief spell in charge of Real.
Spain international Marco Asensio came close to giving Real the lead when he struck the post midway through the first half but CSKA grew in confidence as the game progressed, particularly after taking the lead.
Hoping to spark a second-half revival, Solari threw on Gareth Bale but had a scare when the injury-prone Wales forward appeared to hurt his ankle and required treatment on the pitch, but he was eventually able to continue.
Solari has won eight and lost two games since succeeding Lopetegui.
United lose 2-1 at Valencia and blow chance of top spot
Manchester United endured an undignified end to their topsy-turvy Champions League group stage campaign by losing 2-1 at already-eliminated Valencia on Wednesday and missing their chance of topping Group H.
United were already guaranteed a last-16 berth but needed to win and to see Juventus lose to group minnows Young Boys if they were to take the top spot.
One-half of the unlikely scenario materialised as the Swiss side beat the Italian giants 2-1 but United blew their chance with a defeat that consigned them to second place.
Carlos Soler put the La Liga side ahead in the 17th minute with a powerful finish before United defender Phil Jones scored an embarrassing own goal at the start of the second half to double Valencia's lead.
Substitute Marcus Rashford gave them brief hope of a comeback by heading home in the 87th minute after a rare bright passage of play from the visitors, but Valencia comfortably saw out the victory.
Juventus finished top of the group on 12 points, with United on 10. Valencia, who were already assured of third place and qualification for the knockout stages of the Europa League, finished with eight while Young Boys earned four.
With one eye on Sunday's trip to Premier League leaders and historic rivals Liverpool, Jose Mourinho rotated his side, making eight changes from Saturday's 4-1 win over Fulham, including bringing record signing Paul Pogba back into the fold.
Pogba had United's best opportunity to cancel out Soler's impressive opening strike following a Marouane Fellaini knockdown but somehow missed the target from close range with the goal gaping.
United's task in turning the game around became significantly harder thanks to a clumsy moment from Jones, who failed to communicate properly with team mate Sergio Romero and slid the ball into his own net.
"I think we were too passive in the first half. We were quite comfortable with the ball but not in intensity and ambition," Mourinho told reporters.
"In the second half, I was pretty sure that after speaking at halftime, things could be different but we started with an own goal that gave Valencia a better position to control the game."
Valencia have had a poor campaign in both Europe and La Liga, where they lie 15th in the standings with only three victories, but coach Marcelino said the win had lifted the mood in the dressing room.
"I'm happy for the players because they have competed well in many games this season but things haven't worked out for us. Today, we played with freshness and bravery, and I'm delighted for them because they have suffered," he said.
"There are many tremendous teams in this competition, some real powerhouses. But the thing that counts is winning and, unfortunately, we haven't picked up enough points."
Man City win group as Sane double sinks Hoffenheim
Manchester City battled back to winning ways, coming from a goal down to overwhelm Hoffenheim 2-1 in the Champions League with a brilliant Leroy Sane double that ensured they progressed to the last-16 as winners of Group F on Wednesday.
The already-qualified English champions, who had suffered their first league defeat in 22 matches at Chelsea on Saturday, needed a point to guarantee top spot but were quickly shocked again when going behind to an Andrej Kramaric penalty.
Yet in a hugely entertaining and open encounter, German starlet Sane inspired the comeback against the Bundesliga side with a magnificent free kick moments before the break and another neatly-taken left foot finish just after the hour.
The win, which should have been far more decisive such was City's dominance with 25 goal attempts, saw them top the table on 13 points, ahead of second-placed Olympique Lyonnais, who qualified on eight after they had drawn 1-1 at Shakhtar Donetsk.
The Ukrainian side earned the Europa League spot in third place on six with Hoffenheim last on three.
"We are in the best 16 and now we are going to see the draw, and arrive at the right moment," City manager Pep Guardiola told BT Sport.
"We started flat because Hoffenheim were so demanding about how they attacked the space and, physically, they were stronger. Then we started to play. But the result is good -- we are first."
Guardiola had made it clear beforehand how important he felt topping the group would be in helping City avoid many of the best sides and must have been happy that they can now draw only Atletico Madrid, Schalke, Roma or Ajax Amsterdam in the last-16.
Hoffenheim made a bright, enterprising start, with Kramaric putting them ahead from the penalty spot in the 16th minute after Aymeric Laporte bundled over Benjamin Hubner in the box.
Yet after the Croat had continued his remarkable run of scoring for both club and country for a ninth match in a row, City poured on the pressure as both Gabriel Jesus and Nicolas Otamendi, with headers against the woodwork, cursed their luck.
With John Stones also thwarted by Oliver Baumann's fine save, City looked to be getting frustrated until, in first-half stoppage time, Sane produced a magnificent curling left-footed free kick to equalise.
The largely one-way traffic continued after the break as Jesus and Otamendi both spurned chances and Sane somehow conspired to make a mess of the finish after Raheem Sterling had sprinted clear from just outside his own box.
Yet the 22-year-old, in searing form, made up for his blunder with a cool 61st minute finish from Sterling's assist.
Guardiola described Sane's free kick as "incredible" and used the same word to praise Phil Foden, the 18-year-old midfielder who is one of the brightest prospects in the English game and who delivered a fine performance on a rare start.
Lewandowski double sees Bayern claim top spot after Ajax thriller
Striker Robert Lewandowski scored twice as Bayern Munich sealed top spot in Group E following a thrilling 3-3 Champions League draw at Ajax in which both sides ended with 10 men.
Ajax came from behind to lead through Dusan Tadic's double and looked set to claim top spot before a frenetic finale in which Bayern edged in front only for Nicolas Tagliafico to equalise for the hosts deep into stoppage time.
Lewandowski, who has now scored 21 goals in as many games in all competitions this season, grabbed an equaliser from the penalty-spot before Kingsley Coman struck what seemed an excellent late winner for the German side.
The hosts set up a thrilling finish when defender Tagliafico's effort ended up in the back of the Bayern net, but the visitors were able to see out the remaining seconds and go into the second round draw as one of the seeded sides.
Both teams finished the pool unbeaten with Bayern on 14 points to Ajax's 12, while Benfica ended in third with seven points after they claimed a 1-0 home victory over AEK Athens thanks to Alex Grimaldo's late winner.
Bayern led 1-0 at halftime thanks to Lewandowski's 13th minute goal, but the game came to life in an extraordinary second period.
Ajax levelled through Tadic before both sides were reduced to 10 men in separate incidents, with the home side's Austrian defender Maximilian Wober given a straight red card for a wild lunge and Bayern's Thomas Muller following him seven minutes later for another dangerous tackle.
Ajax looked like they might snatch top spot in the pool when Tadic put them ahead via the penalty spot, but that lead lasted only four minutes as Lewandowski also converted from the spot.
Coman netted with a fine strike from just inside the box as the game went into stoppage time, but there was still time for a desperate Ajax to find an equaliser as they poured players forward and Tagliafico tapped home Klaas-Jan Huntelaar's cross.
Lyon draw 1-1 with Shakhtar to reach last 16
Olympique Lyonnais earned the point they required to book their place in the Champions League last 16 but needed Nabil Fekir's equaliser 20 minutes into the second half to salvage a 1-1 draw away to Shakhtar Donetsk.
The French side fell behind to a goal from Junior Moraes midway through the first half and looked in danger of being overtaken in Group F by the Ukraine side and bowing out.
But Fekir's curled shot from just inside the box meant they drew for the fifth time in the group to finish as runners-up to Premier League champions Manchester City.
Lyon had never lost against Ukrainian opposition in five previous European encounters and came into the match in good form, having lost only twice in 17 matches so far this season.
They were the better team for most of the match but suffered some hair-raising moments in the final period of the game as Shakhtar threw everything forward in search of the goal that would have taken them through.
In the end, though, it was Shakhtar's inability to keep a clean sheet -- this was their eighth European match in a row where they conceded at least one goal -- that cost them dearly.
The result means Shakhtar finish in third place and go into the Europa League knockout stage.