Despite defeating Real Sociedad 1-0 on Thursday in Spain, Manchester United will play a knockout round playoff in the Europa League.
In order to finish ahead of the Basque team at the top of Group E, the Red Devils knew they needed to win by a margin of two goals. Real Sociedad and Man United finished the group stage with the same number of points (15) and head-to-head records, but Real Sociedad automatically advanced to the knockout round due to their superior goal difference, while Man United would have been eliminated from the Champions League after two legs in February and could have faced Barcelona or Juventus in Monday's draw.
The game was determined by Alejandro Garnacho's first goal for the Red Devils, but in San Sebastian, the 20-time English champions were unable to get the second goal they need. Real Sociedad was on the attack early on, as Carlos Fernandez fired one into David de Gea's side net in the fifth minute.
However, the offside flag would have prevented the home team from grabbing the lead from that attack, had the ball gone in.
When Cristiano Ronaldo's stunning pass set up Garnacho for the game-winning goal in the 17th minute, the kid produced a superb finish to find the back of the net.
In the 27th minute, Garnacho had another chance to score after getting into the Real Sociedad box, but the kid missed the crossbar after using his astute footwork to create space.
Before rolling one into the arms of the Man United goalkeeper five minutes before halftime, Pablo Marin attempted a long-range shot in the 32nd minute as the home team attempted to respond. However, his effort was constantly moving side of De Gea's goal.
Ronaldo missed a wonderful opportunity to give Man United a second goal in the 42nd minute as his chipped attempt hit the top of the net.
De Gea then produced two superb saves to maintain the score at 1-0. The second stop, from Marin, was particularly impressive because of how quickly he responded after diving to stop Andoni Gorosabel's initial shot.
Alexander Sorloth's header for Real Sociedad early in the second half was deflected over the crossbar by Lisandro Martinez, while Brais Mendez's attempt went wide immediately after.
Just before the hour, Man United introduced Marcus Rashford and Scott Mc Tominay, and the visitors switched to a back three in pursuit of the crucial second goal.
After Fernandez missed the crossbar for the opposition in the 70th minute, Real Sociedad had a good stretch, and De Gea had to save a low shot from Ander Guevara.
Then, in the 78th minute, Sorloth shot wide of the goal before Harry Maguire and Fred were introduced for the guests, with the Man United captain moving into a forward position.
Despite some late panic in the home team's box, the Red Devils were unable to score a second goal because Real Sociedad had advanced to the knockout round on the basis of goal differential. Erik ten Hag's team now needed to win a two-legged knockout round playoff in order to advance in the competition.
On Sunday, Man United will go to Aston Villa in the Premier League, while Real Sociedad will host Valencia in the La Liga.
For more Sports updates please follow us on Twitter