MONTREAL - The clash of the world's top two women's soccer powers came down to a pair of penalties in the second half.
Top-ranked Germany's Celia Sasic missed one, and Carli Lloyd, captain of the second-ranked United States, buried hers.
And that put the Americans into the FIFA Women's World Cup final after a 2-0 victory over Germany before 51,176 mostly pro-American fans at Olympic Stadium on Tuesday night.
"It was so incredibly loud," said U.S. midfielder Lauren Holiday. "You get goosebumps.
"To get a win like that gives us extreme confidence going into the World Cup final."
The Americans will face the winner of the England-Japan semifinal in the championship game Sunday in Vancouver.
Substitute Kelley O'Hara got an insurance goal, her first of the tournament, to seal the victory in the 84th minute, but the game was decided earlier on some debatable calls from Romania referee Teodora Albon.
In the 59th minute, Alexandra Popp broke through the U.S. defence but was given a tug on her left shoulder by Julie Johnson, who was shown the yellow card rather than the red even though she was the last defender back.
It also brought a penalty shot, but Sasic, Germany's most dangerous scorer who popped in penalties in both regulation time and the shootout in the quarter-final against France, completely missed the net, much to Johnson's relief.
"I wish I could have that moment back," said Johnson. "It's a defender's worst nightmare.
"The team definitely lifted me up after that."
Only 10 minutes later, Annike Kraun's body block on Alex Morgan looked to be at least a yard outside the penalty area, but Albon signalled a penalty and Lloyd made no mistake.
"It was clearly outside the penalty area," said German coach Silvia Neid. "Of course I was sad that the penalty decided the match, but what am I going to do? The referee made a decision and you have to live with it."
U.S. coach Jill Ellis said officials calls are part of the game and "whether we're on the receiving end or the other end, it's not something to comment on."
A huge roar went up from the grandstands as Lloyd potted her third of the tournament. The Germans didn't threaten again and the U.S. sealed it when O'Hara volleyed home a cross.
"It's euphoric," said O'Hara. "It's something I was not expecting.
"I'm just so proud of this team. A a sub, you just want to help your team."
The Americans controlled most of the first half but the Germans, who had left too much open space, were quicker on the ball after the intermission, even if they failed the penetrate the U.S. defence. Goalkeeper Hope Solo posted her fifth clean sheet of the tournament.
"They really tested us," said Ellis, whose team is seeking a third World Cup title but a first since 1999.
"I feel we've got momentum going into the final," said Lloyd. "I have a really confident feeling about winning it."
The stadium went quiet in the first half when Popp and American midfielder Morgan Brian bumped heads while going for a high free kick in front of the U.S. goal. Both players were down for a about three minutes, with Popp bleeding from the head, but both got up and stayed in the match.