Bayern Munich barely staved off an improbable comeback Wednesday, eliminating Arsenal from the Champions League despite a 2-0 loss at home to leave England without a team in the quarter-finals for the first time in 17 years.

Olivier Giroud gave Arsenal and early lead in the third minute and Laurent Koscielny added the second in the 86th but Arsenal remained one goal away from erasing its 3-1 deficit from the first leg.

"Our second goal came a bit too late," Arsenal manager Arsene Wenger said. "Bayern was nervous but we paid the price for not playing well in the first leg."

With the series level 3-3 on aggregate, Bayern advanced to the quarterfinals on the away goals rule.

"It wasn't our plan to concede such an early goal," Bayern coach Jupp Heynckes said. "Our second half was better, but we did not really control the game, we were not calm."

Bayern is a four-time winner of the competition and was runner-up twice in the last three seasons. It reached the last eight for the 12th time. With Borussia Dortmund also in the quarterfinals, Germany has two sides in the last eight for the first time in 11 years.

With Manchester United, Manchester City and Chelsea all having been eliminated already, England is without a team in the quarter-finals for the first time since 1996. The loss also ensured that Arsenal will finish without a trophy for the eighth straight season.

In the second match Wednesday, Malaga beat Porto 2-0 to reach the last eight 2-1 on aggregate.

Arsenal's players had said before the game they needed a "miracle" to advance, and after the early goal it looked like they might just get one.

Tomas Rosicky fed Theo Walcott on the right and the winger found space when David Alaba slipped on the wet grass. Walcott raced into the penalty area and sent a hard, low ball through the legs of Dante and across the goal for Giroud to drive it into the roof of the net from a couple of meters (yards) out.

That made for a nervous evening for the home crowd, although Bayern gradually took control of the game and didn't allow any more dangerous chances for the rest of the half. The hosts then dominated much of the second half but were limited mostly to long-range attempts.

Shots from Arjen Robben, Toni Kroos and Luiz Gustavo narrowly missed Arsenal's goal and the best chance for Bayern came when Thomas Mueller sent a through ball with his heel for Robben, who raced alone toward the goal but was foiled by goalkeeper Lukasz Fabianski in the 68th.

Arsenal had only one real chance before its second goal, when substitute Gervinho rolled the ball past Manuel Neuer but also wide of the post.

Arsenal then added more suspense into the match by netting the second.

Santi Cazorla sent in a corner and Koscielny beat Javi Martinez to the header and sent the ball low inside the right post.

Arsenal couldn't seriously threaten again, though, as Bayern hung on to its edge from the first leg.

"It shouldn't have been that close," Robben said. "We talked about it before the match. Arsenal had nothing to lose and we were not aggressive enough. Maybe it was a wake-up call. We conceded an early goal and there were still eight minutes to play after their second, we knew we were close to letting it slip away."

Bayern remains on course for three trophies. It is 20 points ahead in the Bundesliga and is also in the semifinals of the German Cup.

Malaga 2, Porto 0

Malaga became the third Spanish team to reach this year's Champions League quarter-finals by beating 10-man Porto 2-0 on Wednesday to overturn a first-leg deficit.

Porto won 1-0 at home last month but Malaga's 20-year-old forward Francisco "Isco" Alarcon levelled the series in the 43rd minute by scoring with a high, curling shot that beat goalkeeper Helton and went into the far top corner. 

300-malaga

Malaga's Isco Alarcon, left, celebrates with teammate Joaquin Sanchez after scoring against FC Porto during the Champions League round of 16 second leg against FC Porto at Rosaleda stadium in Malaga, Spain on Wednesday. (Miguel Angel Morenatti/Associated Press)

Roque Santa Cruz then got the decisive second when he rose to head a corner into the far post in the 77th, with fans in the La Rosaleda Stadium chanting "Yes we can."

"This was unthinkable not long ago and it's incredible," Isco said. "This is a dream come true for everyone here, given that no one in Malaga has lived through anything like this, but we've deserve it."

In Wednesday's other game, Bayern Munich lost 2-0 at home to Arsenal but still went through on away goals after winning the first leg 3-1 in London.

Porto played a physical game from the start, challenging hard for the ball in an attempt to protect its advantage, but the tactic quickly backfired. The Portuguese team earned three yellow cards in the first 30 minutes, and forward Steven Defour was then sent off in the 49th for his second booking after a late challenge on Joaquin Sanchez.

Isco's goal made him just the sixth Spain under-21 player to score in the knockout stages of the Champions League and he follows in the footsteps of Raul Gonzales, Jose Reyes, Cesc Fabregas, Bojan Krkic and Cristian Tello.

Porto had come close to equalizing in the 75th when James RodrDiguez floated a precisely aimed free kick toward Jackson Martinez, who deflected it just wide.

Two-time European champion Porto, which hadn't lost an away game in 2013 and is currently second in the Portuguese league, two points behind Benfica, had been aiming for its seventh quarter-final appearance.

Instead, Malaga joined Barcelona and Real Madrid in the last eight, showing the strength of Spanish football once again.

Malaga had the support of actor Antonio Banderas, who was born in the city and was in the stands wearing a team scarf.

"I came to this stadium for the first time in 1968, when I was 8 years old, and sincerely this is probably the most important match in the history of our team," Banderas said.