SEVILLE, Spain — Bayern Munich needed a couple of lucky bounces to prevent Sevilla from pulling off another Champions League upset.

After being outplayed by the hosts early on and conceding a 32nd-minute opener by Pablo Sarabia, Bayern came from behind to beat Sevilla 2-1 in the first leg of their quarterfinal Tuesday thanks to an own goal by Jesus Navas and a second-half header by Thiago Alcantara. Both times the ball deflected off a defender to take Sevilla goalkeeper David Soria out of play.

"Psychologically, it was very important to equalize quickly, even if it took a bit of luck," Bayern coach Jupp Heynckes said. "But if we want to win the Champions League, we need to improve. ... We lost the ball too often and lacked structure in midfield, which allowed Sevilla to create chances. We improved in the second half and in the end deserved to win."

Bayern now only needs a draw in the second leg in Munich next week to reach the semifinals for the fifth time in six seasons.

Sevilla, playing in the last eight for the first time in 60 years after overcoming heavily favored Manchester United in the previous round, has never made it to the semifinals in the Champions League.

In Tuesday's other game, defending champion Real Madrid defeated Juventus 3-0 in Turin after two goals from Cristiano Ronaldo — including a stunning overhead kick to make it 2-0 in the second half.

"We were unlucky," Sevilla coach Vincenzo Montella said. "We played well against a very strong Bayern team. We deserved more."

Sevilla started well and had the best chances early at Sanchez-Pizjuan Stadium. And they were rewarded when Sarabia opened the scoring with a close-range shot after beating Bayern defender Juan Bernat to a pass by Sergio Escudero into the area. However, replays showed that Sarabia, who had missed a great chance a few minutes earlier, may have controlled the ball with his arm before calmly finding the net.

The hosts seemed in control but Bayern levelled with fortuitous goal five minutes later. Franck Ribery tried to make a low cross into the area but the ball deflected off Navas and was redirected toward the near corner. Soria tried to change directions quickly but he couldn't keep the ball from trickling across the goal line after it hit the post.

"We played well in the first half, created many chances, but that own goal was key," Sarabia said. "It hurt us when we were playing better. In the second half they improved and controlled possession. It will be hard, but we are not out of it yet."

Bayern began taking control of the game in the second half and started creating more chances. Javi Martinez had his close-range shot saved by Soria in the 66th, and two minutes later Alcantara scored the winning goal after a cross by Ribery. This time the ball deflected off Escudero before going in.

Sevilla is trying to establish itself as a contender in the Champions League after dominating the second-tier Europa League in recent years, having won the competition three times in four seasons.

The Spanish club was eliminated by Leicester in the round of 16 last year.

Bayern, a five-time European champion, has made it to the last eight nine times in 10 seasons. It arrived for Tuesday's game coming off a 6-0 rout of Borussia Dortmund in the Bundesliga, a competition it looks set to win for the sixth consecutive time.