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."