(CNN) -- Bayern Munich scored in injury-time to defeat Manchester United 2-1 in the first leg of their Champions League quarter-final, while Lyon beat their French rivals Bordeaux 3-1.
Bayern striker Ivica Olic pounced on a mistake by United defender Patrice Evra to score the winner after the German side had equalized through a Franck Ribery free-kick.
United had taken the lead after one minute through Wayne Rooney, who hobbled off with an ankle injury just before the final whistle at the Allianz Arena.
The result gives Bayern a slight advantage going into the second leg at Old Trafford, Manchester, next Wednesday.
United, who beat Bayern in the 1999 final, got off to the perfect start when an unmarked Rooney crashed a close-range volley into the net for his 34th goal of the season.
Rooney missed a chance to double United's lead when he broke free in the penalty area, only to prod a weak shot straight at Bayern goalkeeper Hans-Jorg Butt.
Bayern grew in strength as the game wore, with Olic failing to connect with a cross when it appeared easier to score.
The Germans gained the reward their superior football deserved after 76 minutes when Ribery's free-kick deflected off Rooney into the corner.
The game appeared to be heading towards a draw when Olic snatched the ball from Evra, cut into the box and placed his finish past Edwin Van der Sar.
"We didn't play well enough," United manager Alex Ferguson told Sky Sports. "Bayern were the better team and it's a disappointing performance possession-wise. They put in a big effort, but we're better than that."
Rooney twisted his ankle in the closing moments of the game and will be assessed on Wednesday, Ferguson said.
The striker, set to be England's spearhead at the World Cup in South Africa in June, could be a doubt for Saturday's English Premier League showdown with title rivals Chelsea, he added.
In Lyon, the home side took the lead after 10 minutes when Mathieu Bodmer's cross was turned in by Lisandro Lopez.
Bordeaux drew level four minutes later when Marouane Chamakh headed home Yoann Gourcuff's cross.
Michel Bastos restored Lyon's lead with a left-footed drive and Lisandro's penalty gave them a cushion going into next week's second leg in Bordeaux.