Swiss side, Young Boys showed no sign of youthfulness when they visited Manchester United on Wednesday in the Champions League.
Having gone down against Juventus, the Red Devils needed to win to keep up the momentum.
Anything other than maximum points would derail their chances with Valencia breathing down their neck.
United struggled to dominate the encounter in front of their fans.
As the board was raised to signal three minutes of injury time, United were still looking for their first goal at Old Trafford in the Champions League this season.
It was Marouane Fellaini who stood up to be counted in injury-time to give the hosts a dramatic victory over Young Boys and sent his side into the last 16 of the Champions League.
Fellaini collected Romelu Lukaku’s flick in the box from Luke Shaw’s pass, held off Loris Benito and, with the ball touching his hand in the process, turned to fire into the bottom corner.
The goal brought a wild reaction from United boss Jose Mourinho, who dumped a basket full of water bottles to the floor in celebration.
“I always try to give everything for the team whether I start or don’t start,“ Fellaini told United’s website. ” Everybody knows I am a team player.
“The manager has given me a lot of confidence. He trusts me. That is important for a player and I try to give it back and repay him on the pitch. I give everything for him, I feel comfortable and I am happy with him.”
“It’s always good to be in the Champions League. It’s going to be a good atmosphere at the Mestalla, Valencia are a good team, so we go there with no pressure and play our game.“
Fellaini’s goal was his second of the season in all competitions.
“It’s always good to score a goal but, for me, the most important thing is the three points,” he said.
“I think the supporters deserved that. I think that it was positive, I think the players were positive and aggressive.”
United though still trail Juventus in the group. The Italian side are unbeaten in the competition and are amongst the favourites to lift the title at the end of the season.
Former Manchester United man Cristiano Ronaldo will be hungry for a fourth Champions League title in as many years following an extremely successful period in Spain.