The drama was only beginning when the U.S. Olympic gymnastics trials ended Sunday night.

Somewhere behind closed doors, the women's selection committee huddled while a sold-out crowd at HP Pavilion waited nervously to find out what four young women would join all-around champion Gabby Douglas at the London Games.

After an excruciating 10 minutes, Douglas led Jordyn Wieber, Aly Raisman, Kyla Ross and McKayla Maroney -- all five teenagers with tears streaking down their faces -- back out on the floor, newly crowned Olympians as red, white and blue confetti filled the air.

But those also were tears of sadness because they knew supremely talented gymnasts who had shined in San Jose didn't make the five-member squad. The crying game had begun when women's national team coordinator Martha Karolyi announced the team.

"She started tearing up and then everyone else got emotional," Raisman said. "None of us had ever seen her break down like that, and you could see how difficult it was to choose this team. She just felt so bad that she could only name five of us."

For instance, Maroney might be the reigning world vault champion, but she was no lock to make the team when she finished seventh at the trials after returning from a concussion. But Maroney was picked instead of equally worthy Elizabeth Price and Sarah Finnegan, who are alternates along with Anna Li.

"This is the five that I expected," Karolyi said. "I had in my mind maybe two months ago this group. But that doesn't mean choosing them was easy."

The reality is the women's and men's teams heading to London are loaded and expected to bring home a medal haul. The women are the defending world champions. The men finished third at last year's worlds, but are stronger now with rising stars Danell Leyva and John Orozco.

But just to get to the Olympics, the chosen 10 had to survive the white-hot cauldron of the San Jose trials.

"This forges steel," said Jonathan Horton, who was named to the men's team earlier in the day. "It puts that ice in your veins. You learn how to deal with the nerves. The more you experience success under pressure, the more you believe that you can win. Now let's go get a gold medal."

Think of putting together an Olympic squad as a complicated jigsaw puzzle. For the selection committees, it was all about making the pieces fit together.

In London, three U.S. gymnasts will compete on each apparatus in the team competitions. So the committees had to weigh every athlete's strengths and weaknesses in the larger picture of making sure the teams will be strong in each event.

The men's selection committee filled out its team with two-time 2008 Olympic medalist Horton, Jake Dalton and Sam Mikulak. They join Leyva and Orozco, who had earned automatic berths by finishing one-two in the qualifying process.

While Karolyi knew what team she wanted, the men's selection process really boiled down to math. Armed with computer programs, the committee crunched spreadsheets of numbers that are more complicated because the men compete in six events compared to just four for the women.

That Moneyball approach spit out what men's national team coordinator Kevin Mazeika believes is a winning team.

"At the end of the day, it's all about the empirical data," Mazeika said. "We looked at every possible scenario in building this team. We feel this is a well-balanced group that cannot only win a medal, but the gold medal." Mikulak was chosen even though the Orange County native competed in just the pommel horse Saturday because of a badly sprained left ankle. Both Mikulak and Dalton make the U.S. stronger in the vault and floor exercise, and that's probably why they were selected over Chris Brooks -- who was an alternate with Steven Legendre and Alex Naddour.

"It's hard even for those of us who make it because we looked around the room and there are guys who belong on this team but aren't," Horton said. "Five spots just aren't enough."

The tears after the women's competition proved the same thing on their team. But when she heard her name called, Maroney sought out Ross, a best friend since age 7.

"I told her, we did it!" said the 16-year-old Maroney. "Dreams really do come true!" They did for 10 gymnasts. Now, London is calling.