Manchester United passed up the opportunity to secure progression to the Champions League knockout phase, as Michael Lang's late winner clinched a 1-0 victory for Basel and put the Swiss side in the driving seat to finish second behind their visitors in Group A.
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 in which 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 with work to do in their final group game against the Russians.