Bayern Munich have the advantage. Mario Gomez's stoppage-time winner gave last night's hosts a crucial lead as they fought with Real Madrid for the right to play one more Champions League game in their Allianz Arena this season; the final against Chelsea or Barcelona on 19 May.

It was a predictably tense semi-final first leg, but after Mesut Ozil had equalised Franck Ribéry's opening goal, Real Madrid tried to conserve and take the score draw back to the Bernabeu next week. It nearly worked, until Gomez's late winner delivered Bayern the reward which their 90-minute dominance had warranted.

"A draw would have been a fairer result but this is football, whoever scores wins and the game ends when it ends," said the Real coach, Jose Mourinho. "It's not a terrible result. It's not as if we need an historic comeback with crazy numbers in the second leg, we need a normal result, 1-0 or 2-0, which we are capable of getting with our supporters behind us."

Bayern did not take long to gain control of the first half. With a midfield core of Luis Gustavo and Bastian Schweinsteiger tipped off by Toni Kroos, they had a more competitive and harder-working unit. The result was that they had more of the ball and could build attacks from the back, and through the middle, while Mourinho's side were more dependent on the forward bursts of individuals to create chances. They did, in fact, have the game's first opportunity, as Karim Benzema's shot was tipped over after seven minutes, but the rest of the half belonged to Bayern.

Ribéry, so desperate to reach the final, having been suspended for the 2-0 defeat to Internazionale in 2010, felt that he ought to have earned Bayern a penalty after 15 minutes, tumbling after Sergio Ramos's pull, but English referee Howard Webb allowed play to continue.

It only took two more minutes for Ribéry to make up for it. A corner-kick bounced off Holger Badstuber and dropped to the feet of the Frenchman, in rather more space than Mourinho would have wanted. The finish was instinctive: Ribéry stabbed the ball underneath Iker Casillas.

Ribéry, along with Kroos, continued to be the most influential player, stealing the ball back quickly from the visiting players. He created the next best first-half chance, rolling the ball to Schweinsteiger, whose powerful shot went wide. But Real Madrid have enough quality not to worry about a lack of possession. With such incisive forwards there will always be opportunities. One Cristiano Ronaldo free-kick flew over, another hit the wall.

The break for the quarter-point in the tie came with Bayern ahead, but just eight minutes after it Madrid equalised. Benzema cleverly held the ball up before playing in Ronaldo. It should have been enough but the Portuguese winger unexpectedly shot straight at goalkeeper Manuel Neuer. The ball, however, broke back to Ozil and he passed back to Benzema, who again found Ronaldo. Another shot, another parry, but this time Ozil finished from close range.

Quick to react to the need for another goal, Jupp Heynckes, the Bayern coach, withdrew Schweinsteiger for Thomas Müller. And with Bayern trying to improve their service to Gomez, the always-reacting Mourinho sent on Marcelo and then Esteben Granero for Ozil and Angel Di Maria respectively.

The pattern was set: Madrid were hoping to take their 1-1 back to Spain next week. Gomez was desperate to stop them. First he bounded on to a through ball but could not quite beat Casillas to it. Then, 20 minutes before the end, he was in the right place as the ball broke to him in the box, but swung at it and wasted an excellent chance. When, with three minutes left, Gomez was cut down in the box by Ramos, again, and Webb was no keener to give a penalty, he must have worried that Bayern would take no lead to the Bernabeu.

But, in stoppage time, Gomez got the goal he had been waiting for. Philipp Lahm broke down the right and skipped past the callow challenge of Fabio Coentrao. Lahm whipped in a cross and Gomez, delighted to have one last chance, bundled the ball in.

"My players showed what I had demanded from them yesterday: lust and hunger for success," Heynckes said. "I think we more than deserved the win because we played cleverly and intelligently."