MUNICH — Cristiano Ronaldo scored twice for Real Madrid to beat Bayern Munich 2-1 in the first leg of their Champions League quarterfinal Wednesday, ending the German side's tournament record of 16 straight wins at home. Ronaldo's second-half goals saw him become the first player to score 100 goals in European club competition. The Portuguese star ensured Madrid came from behind — after Arturo Vidal's 25th-minute header for Bayern — to put the defending Champion on course to reach the semifinals for a seventh successive year. The second leg takes place in Madrid Tuesday. "We are still alive," said Bayern coach Carlo Ancelotti after losing to his former side. Also Wednesday, Antoine Griezmann converted a first-half penalty for Atletico Madrid to beat Leicester 1-0 at home. Bayern was without club top-scorer Robert Lewandowski after he failed to recover from a knock to his right shoulder. But it had not been beaten at home in the competition since April 2014, when it lost 4-0 to Ancelotti's Madrid in the semifinals. Madrid went on to win the title. Ancelotti's successor at Madrid, Zinedine Zidane, is bidding to become the first coach to lead a side to back-to-back titles in the Champions League era. Bayern forced several corners early on and the sixth finally paid off when Vidal headed home through Keylor Navas' fingers. Madrid displayed none of the initiative shown by Bayern in the first half. While Arjen Robben, Franck Ribery, David Alaba and Thiago Alcantara were running and forcing the game, the visitors appeared static, waiting for chances to present themselves. They weren't forthcoming. Bayern should have been 2-0 up at the break, but Vidal sent his penalty well over the bar after Dani Carvajal was adjudged to have handled the ball. The Madrid defender was booked though TV replays showed Ribery's shot had hit his upper body. "It happens in football. It's not the first time and it won't be the last," Ancelotti said of the missed penalty. Ronaldo scored two minutes after the break with one touch to Carvajal's cross. It ensured Madrid extended its Spanish record of scoring in 53 consecutive games. Bayern was dealt a blow with a half-hour to play when Javi Martinez was sent off with two yellow cards within three minutes for fouls on Ronaldo. "The sending off was the turning point," Bayern captain Philipp Lahm said. But Madrid had already forced the home side back. Navas had little to do and Manuel Neuer was by far the busier ‘keeper. "Their goalkeeper saved lots of chances. A lot," Zidane said of Germany's top ‘keeper. Marco Asensio's introduction for Gareth Bale also invigorated the visitors. Neuer denied Karim Benzema, then Ronaldo from point blank, but he couldn't stop the ball from squirming between his legs from Ronaldo's shot after Asensio crossed in the 77th to give Madrid the clear advantage. It could have been worse for Bayern — Sergio Ramos had a goal ruled out late for offside. In Leicester, Griezmann coolly scored from the spot in the 28th minute by sending goalkeeper Kasper Schmeichel the wrong way with a firm strike into the left corner. The penalty came after Griezmann was clipped by Leicester defender Marc Albrighton after making a long run down the left flank. Griezmann appeared to be still outside the area when he was fouled. Diego Simeone's Atletico is trying to reach the semifinals for the third time in four seasons, while Leicester — the shock Premier League winner last season — is looking to make another stunning title run in its debut in the Champions League. The second leg takes place Tuesday in England. Wednesday's win extended Atletico's unbeaten run in all competitions to nine matches. It has conceded only two goals in its last eight games.