MADRID (AP) — Bastian Schweinsteiger sent his penalty kick slicing straight down the middle, and then ripped off his shirt with a roar of triumph.
No way Bayern Munich was going to miss the big party at its own house.
Bayern Munich became the first team to advance to a Champions League final it is hosting Wednesday night, beating Real Madrid 3-1 on penalty kicks when Schweinsteiger converted the final shot after Sergio Ramos skied his over the crossbar.
"When I think about the fact that we can play a final in our own stadium, this is something to go absolutely crazy about," Bayern coach Jupp Heynckes said.
Go wild Bayern and its fans did, staying on the field long after Madrid coach Jose Mourinho — who watched the shootout from his knees — descended into the tunnel. Madrid's players left the field with their heads hanging low, and some were in tears after coming so close to reaching their first final in 10 years.
"It's a big blow for us. It was a very exciting game, but penalties are always a lottery," Madrid goalkeeper Iker Casillas said. "We played well, but Bayern are a great team."
Bayern, a four-time champion of European soccer's top club tournament, reached the final for the second time in three seasons, and will play Chelsea at Allianz Arena on May 19. Chelsea eliminated defending champion Barcelona on Tuesday.
"We will be very much at home in our own stadium and will be in front of a majority of German supporters, but it won't be easy," Heynckes said. "Today we proved we are a great team. We showed today we play very well at football."
Following Bayern's 2-1 win in Germany last week, Cristiano Ronaldo looked to have put the home side on its way to the final with two early goals. He converted a penalty kick in the sixth minute after a cross by Angel Di Maria went off a hand of sliding defender David Alaba. Ronaldo doubled the lead in the 14th from inside the penalty area from a pass by Mesut Oezil, his 56th goal of the season.
But just like its Spanish rival Barcelona the evening before, Madrid faltered. Hungarian referee Victor Kassai awarded Bayern a penalty kick after Pepe pushed Mario Gomez, and Arjen Robben converted it in the 27th minute. That evened the aggregate score in the series 3-3, and also evened the away goals 1-1.
The score stayed that way through the second half and 30 minutes of overtime, forcing the shootout, the first in the semifinals since Liverpool defeated Chelsea in 2007.
"Trailing 2-0, everyone knows the atmosphere here, everyone knows how difficult it is to come back from this score. But we improved with each minute and played organized in defense," said Heynckes, who was Madrid's coach when it won the Champions League title in 1998.
In the shootout, Alaba beat Casillas with the first kick, and Bayern's Manuel Neuer saved Ronaldo's shot. Coming in, Ronaldo had converted 26 of 27 penalty kicks for Real Madrid. The only time he failed was when Almeria's Diego Alves saved him in a Spanish league match on Dec. 5, 2009, his first season in Madrid. Ronaldo also had a penalty saved by Chelsea's Petr Cech in the 2008 Champions League final.
Gomez converted his kick for a 2-0 lead, and Neuer stopped Kaka's shot. Casillas then denied Toni Kroos, Xabi Alonso scored for Madrid, and Casillas stopped Philipp Lahm.
Ramos sent his shot high over the bar — as if it were an NFL field goal — and Schweinsteiger put his shot straight down the middle as Casillas dived left, giving Bayern its fourth victory in five semifinal meetings with Madrid.
"It's so unique to reach the final in Madrid, which is just about Spanish champion over Barcelona," Heynckes said. "This makes me very proud to have made it to the final."
Madrid and Barcelona were considered by many to be Europe's top two teams this year. Ronaldo has scored a Spanish league-record 42 goals, with Lionel Messi one behind him.
But neither will be playing for the Champions League trophy. It is the second straight year that Madrid bowed out in the semifinals.
Real, in its second season under coach Jose Mourinho, has not reached the final since winning in 2002.
Mourinho said Madrid was at something of a disadvantage because it couldn't rest players last weekend like Bayern did. While the Bundesliga league race was wrapped up, Madrid had to face Barcelona in a game that essentially decided the Spanish league title. Madrid's 2-1 victory gave Mourinho's team a seven-point lead in the domestic league with four games remaining.
Still, Mourinho conceded that Bayern "deserve to go through."
"That's the beauty of football, nobody knows what's going to happen," Mourinho said. "I hope it's a good final."
Associated Press Writer Frank Griffiths contributed to this report.
Paul Logothetis can be reached at: www.twitter.com/PaulLogoAP