Manchester United slumped to a limp defeat in Valencia as Phil Jones' own goal ensured they passed up the chance to win Champions League Group H.
United were already assured of qualification for the knockout stages, and a win would have taken them above Juventus, who were surprisingly beaten 2-1 by Young Boys of Switzerland.
But Jose Mourinho's side put in a poor performance and were well beaten by a team, 15th in the Spanish top flight, who named an experimental line-up as they were already certain of finishing third.
Carlos Soler pounced on Jones' headed clearance to strike home a fizzing low finish amid slack marking for Valencia's opener.
And Jones was badly at fault for the second after the break as he diverted a through ball past Sergio Romero from outside his own box, when the United keeper had left his line to claim the ball.
Three bright second-half substitutes combined to earn a late consolation, as Marcus Rashford headed home Ashley Young's cross after Jesse Lingard kept the ball in play.
Juan Mata then almost grabbed an equaliser as he fired a volley wide from inside the box after Paul Pogba's smart chip over the defence.
But defeat means United will play a group winner in the knockout stage, one of Barcelona, Borussia Dortmund, Paris St-Germain, Porto, Real Madrid and Bayern Munich.
But defeat means United will play a group winner in the knockout stage, one of Barcelona, Borussia Dortmund, Paris St-Germain, Porto, Real Madrid and Bayern Munich.
Had United finished top, they would have faced one of Atletico Madrid, Roma, Schalke, Ajax and Lyon.
They next play Premier League leaders Liverpool at Anfield in a 16:00 GMT kick-off on Sunday.
Pogba and Jones not only culprits
Before the game. United boss Mourinho singled out Pogba, urging him to make "a good impact" after being left out of Saturday's 4-1 Premier League home win over Fulham.
The Frenchman's most notable contribution was somehow shooting wide from four yards from a Marouane Fellaini knock-down, although the assistant referee wrongly adjudged him to be offside.
In truth it would be hard to argue that any of United's players enjoyed a successful evening.
Striker Romelu Lukaku endured an error-strewn night with several poor, heavy touches, while Fred, starting for just the seventh time since his £47m summer arrival, also looked off the pace in midfield.
Mourinho's side did rally slightly in the closing stages, but for the vast majority of the game only threatened in isolated chances they threw away, while their defending was at times calamitous. Valencia might have scored four or five.
Michy Batshuayi missed a golden chance to double the lead in the first half when he headed over from close range, Dani Parejo was only denied by a last-ditch block and Romero was forced off his line to stop Santi Mina after a Jones slip that followed his own goal.
United may not have been expecting Juve to slip up too, but were aiming to win all three of their away group matches in the Champions League for the first time since 2010-11.
They made the final that year, losing to Barcelona at Wembley. There looks to be very little hope of repeating such a run this term.
Job done, Mourinho says
How important does United's unlikely and slightly fortunate 2-1 victory away to Juventus look now? How about the last-gasp winner at home to Young Boys, when Mourinho celebrated by throwing a drinks bottle carrier cage to the ground?
Ultimately, those points - perhaps not won convincingly - are the difference between playing in the Europa League's last 32 and the Champions League last 16.
Mourinho said, regardless of Wednesday's outcome, it was "job done in a difficult group".
He added: "I don't think we were brilliant in this group phase, but with the problems we had and the injuries we had we managed to come here already qualified."
BBC
United were already assured of qualification for the knockout stages, and a win would have taken them above Juventus, who were surprisingly beaten 2-1 by Young Boys of Switzerland.
But Jose Mourinho's side put in a poor performance and were well beaten by a team, 15th in the Spanish top flight, who named an experimental line-up as they were already certain of finishing third.
Carlos Soler pounced on Jones' headed clearance to strike home a fizzing low finish amid slack marking for Valencia's opener.
And Jones was badly at fault for the second after the break as he diverted a through ball past Sergio Romero from outside his own box, when the United keeper had left his line to claim the ball.
Three bright second-half substitutes combined to earn a late consolation, as Marcus Rashford headed home Ashley Young's cross after Jesse Lingard kept the ball in play.
Juan Mata then almost grabbed an equaliser as he fired a volley wide from inside the box after Paul Pogba's smart chip over the defence.
But defeat means United will play a group winner in the knockout stage, one of Barcelona, Borussia Dortmund, Paris St-Germain, Porto, Real Madrid and Bayern Munich.
But defeat means United will play a group winner in the knockout stage, one of Barcelona, Borussia Dortmund, Paris St-Germain, Porto, Real Madrid and Bayern Munich.
Had United finished top, they would have faced one of Atletico Madrid, Roma, Schalke, Ajax and Lyon.
They next play Premier League leaders Liverpool at Anfield in a 16:00 GMT kick-off on Sunday.
Pogba and Jones not only culprits
Before the game. United boss Mourinho singled out Pogba, urging him to make "a good impact" after being left out of Saturday's 4-1 Premier League home win over Fulham.
The Frenchman's most notable contribution was somehow shooting wide from four yards from a Marouane Fellaini knock-down, although the assistant referee wrongly adjudged him to be offside.
In truth it would be hard to argue that any of United's players enjoyed a successful evening.
Striker Romelu Lukaku endured an error-strewn night with several poor, heavy touches, while Fred, starting for just the seventh time since his £47m summer arrival, also looked off the pace in midfield.
Mourinho's side did rally slightly in the closing stages, but for the vast majority of the game only threatened in isolated chances they threw away, while their defending was at times calamitous. Valencia might have scored four or five.
Michy Batshuayi missed a golden chance to double the lead in the first half when he headed over from close range, Dani Parejo was only denied by a last-ditch block and Romero was forced off his line to stop Santi Mina after a Jones slip that followed his own goal.
United may not have been expecting Juve to slip up too, but were aiming to win all three of their away group matches in the Champions League for the first time since 2010-11.
They made the final that year, losing to Barcelona at Wembley. There looks to be very little hope of repeating such a run this term.
Job done, Mourinho says
How important does United's unlikely and slightly fortunate 2-1 victory away to Juventus look now? How about the last-gasp winner at home to Young Boys, when Mourinho celebrated by throwing a drinks bottle carrier cage to the ground?
Ultimately, those points - perhaps not won convincingly - are the difference between playing in the Europa League's last 32 and the Champions League last 16.
Mourinho said, regardless of Wednesday's outcome, it was "job done in a difficult group".
He added: "I don't think we were brilliant in this group phase, but with the problems we had and the injuries we had we managed to come here already qualified."
BBC