Michael Lang scored a dramatic winner to give Basel a 1-0 victory over Manchester United, who passed up the chance to qualify.
Jose Mourinho’s side needed only a point to win the group and looked as though they would cruise to victory during a first half that they controlled, but Basel rallied brilliantly after the break and stole a deserved winner right at the end.
United were absolutely dominant in the first half and created a host of fine opportunities.
But they were left frustrated, with Romelu Lukaku, Anthony Martial, Marouane Fellaini and Marcos Rojo all going close – the latter pair denied by the frame of the goal.
United’s frustration in front of goal showed no sign of subsiding after the break, as they struggled to craft chances against a Basel side who made a marked improvement and even hit the crossbar through Lang.
The visitors appeared to have done enough to claim the point they needed to wrap up qualification, but Lang decisively struck in the 89th minute, moving them above CSKA Moscow due to a better head-to-head record, while United are left still needing a point against the Russian side to be absolutely sure of progression.
Basel’s dynamic front trio kept United’s defence busy – which included Rojo for the first time since April – during the early stages, but the visitors quickly got to grips and began to command proceedings.
Their first chance came in the 11th minute and it should have been the opening goal, as Lukaku was played through on goal by a fine Paul Pogba pass and saw his effort saved by Tomas Vaclik.
United went even closer a few moments later, with Manuel Akanji heading off the line after Fellaini had appeared to nod in from a corner.
Fellaini saw another header go close in the 16th minute, diverting Daley Blind’s free kick delivery agonisingly wide of the left-hand post.
United were kept at arm’s length for the next 25 minutes, but then three chances came in quick succession.
The first fell to Fellaini, as the Belgian’s header came back off the post, before Vaclik denied Anthony Martial after a brilliant run, and then the crossbar kept Rojo’s deflected 35-yard effort out.
Basel looked rather more purposeful at the start of the second period and Geoffrey Serey Die was not far from putting them ahead in the 51st minute, seeing a rasping effort fly just wide of Sergio Romero’s left-hand post.
The lively Renato Steffen was causing Blind no end of problems, and the winger almost scored a fine goal just after the hour mark, cutting in from the right and seeing a left-footed drive fly just past the far post.
Mourinho responded by introducing Marcus Rashford almost straight away, but his impact was minimal, with Basel remaining on top and hitting the bar through a Lang header 23 minutes from the end.
Zlatan Ibrahimovic’s introduction from the bench did little to inspire a United improvement and they were made to pay for their awful second-half decline late on.
Raoul Petretta charged up the left flank and played a low ball across the face of goal for Lang to sweep home from close range, meaning United need to avoid defeat at home to CSKA in a match sandwiched between crucial Premier League clashes with Arsenal and Manchester City at the start of December.