VANCOUVER, British Columbia -- So much was on the line for the U.S. women's soccer team that maybe some jitters were understandable. When a 30-yard shot hit the frame of goal post, leaving the ball sitting in front of an empty net, the hearts really started pounding.

"That," defender Rachel Buehler said, "was a very intense moment in the game."

Buehler motored in to save the day, knocking an opposing striker off the ball. The Americans had survived another dicey moment. It took a while, but eventually they wore down a heavy underdog and earned their spot in the Olympics.

The United States booked its way to London on Friday night with a 3-0 victory over Costa Rica in the semifinals of the CONCACAF qualifying tournament, a game more suspenseful than most anyone expected.

"There were moments where I think Costa Rica were outplaying us, and it just shows you how important it was to all of us," forward Abby Wambach said. "Nobody wanted to make that mistake. And luckily we didn't."

Tobin Heath scored in the 16th minute to give the U.S. all the offense it needed, and goals by Carli Lloyd (72nd) and Alex Morgan (89th) put the game away.

"We know that sometimes under big game circumstances players can get a little tight," Wambach said. "And you've just kind of got to deal with it. ... It was almost as if we scored that goal and nobody wanted to get stuck into a tackle. We were kind of playing a little bit soft, and we fixed that in the second half."

The top-ranked Americans were certainly not as crisp as they were when they were beating teams by a combined 31-0 in their previous three games and drawing criticism for running up the score. Sloppy passes led to giveaways in the first half, forcing goalkeeper Hope Solo to work harder than she has all tournament.

"When you play games that matter, everybody's a little bit nervous. ... We gave away the ball way too often," coach Pia Sundhage said.

Costa Rica is ranked No. 41 in the world, has never qualified for an Olympics or a World Cup and has never scored on the U.S. in eight meetings. Las Ticas proved to be scrappy opponents, however, occasionally frustrating the Americans with physical play and just missing on two solid scoring chances in the first half in the London-or-bust match. As the possibility of an upset lingered deep into the second half, the plucky team in red gained the rousing support of the Canadian fans at BC Place.

"We put together three great games in group play," said Solo, who played despite a slightly pulled right quadriceps that had been bothering her all week. "You can't play four, five, six. Not every team is going to play perfectly every single game, but we got the job done."

The U.S. will be the two-time defending champions in London, having taken gold in Athens in 2004 and in Beijing in 2008. It will be the third straight Olympics in which the Americans will be trying to make amends for World Cup disappointment from the previous year. They finished second at last year's World Cup in Germany, losing to Japan in the final.

The victory also puts the Americans into the tournament final Sunday, a bragging-rights-only game against the winner of Friday's late game between Mexico and Canada.

The U.S. had scored so easily in the tournament that it seemed odd to see the game scoreless until the 16th minute, when a set piece produced the first goal. Lauren Cheney's corner kick was headed down at the far post by Shannon Boxx. Goalkeeper Erika Miranda made the save but deflected the ball to Heath, whose looping header was her fifth career U.S. national team goal.

Tobin Heath (left) celebrates with Rachel Buehler (center) and Abby Wambach after scoring against Costa Rica during the 2012 CONCACAF Women's Olympic Qualifying Tourney. The Americans won 3-0. Rich Lam/Getty Images

Costa Rica, outscored 34-0 in the seven previous games against the U.S., nearly tied the game after a giveaway by Buehler set up Fernanda Barrantes with a clean look from 15 yards in the 20th minute, forcing Solo to the ground to make the save.

Then, in the 27th, came the play that nearly changed the game. Carol Sanchez launched the 30-yarder that clanged off the frame at the intersection of the post and the crossbar. With Solo on the ground, Buehler fought off Barrantes to keep the striker from getting the rebound with a clean shot at the net.

"I just did everything I could to get back there, get in front of that girl and just prevent the goal," Buehler said.

Costa Rica finally had its hopes deflated in the 72nd, when Wambach's chip shot was cleared off the line by Daniela Cruz and out to Lloyd, whose left-footer from the top of the 18-yard box doubled the lead.

Morgan, back in her usual role as second-half super-sub, chipped in the insurance goal shortly before the final whistle.

Even with the closer-than-expected result, the Americans have evoked the good old days at this tournament with their mostly lopsided scores. While that's hardly surprising given the slow development of women's soccer in parts of North and Central American and the Caribbean, it's also indicative the U.S. still have the deepest, most talented team in the world.

But Sundhage's team arrived in Canada with a bit of apprehension. The Americans, having become somewhat complacent from years of uncontested success in the region, were stunned in a World Cup qualifier by host Mexico in November 2010, forcing them into a home-and-away playoff with Italy just to get for the World Cup. Also, the format for Olympic qualifying is such that everything hinges on one game -- the do-or-die semifinals -- regardless of how a team performs in the rest of the tournament.

Determined to take nothing for granted, the Americans had been full throttle for every game. They set a U.S. team record for goals in a game in a 14-0 win over the Dominican Republic, then nearly matched the feat in a 13-0 rout of Guatemala. Then came a 4-0 win a much anticipated rematch with Mexico to set up the semifinal against Costa Rica.

And even though the vital game didn't go quite as planned, the outcome was all that mattered.

"We," Sundhage said, smiling, "are going to London."