LONDON - When Carli Lloyd lost her starting job with the U.S. women's soccer team, her teammate Abby Wambach wondered how she might respond. She could have pouted, sulked or given up. Or she could do what she did Thursday night at Wembley Stadium, in the eighth minute of the Olympic gold medal game against Japan.

As Alex Morgan sent a pass toward her, Wambach lifted her foot to prepare for a shot. Lloyd beat her to it, blasting past her to head the ball past goaltender Miho Fukumoto. "For maybe a millisecond, I'm thinking, 'Yes, I'm going to score!'" Wambach said. "She ran right through my foot and got to the ball first. She was fighting, she was the cheerleader, she was the motivator."

Best of all, she and her teammates were Olympic gold medalists. Lloyd's two goals -- and several stunning saves by U.S. keeper Hope Solo -- gave the U.S. a 2-1 victory over the team that broke its heart in last year's World Cup, in a spectacularly entertaining game between the sport's reigning female superpowers. At one of soccer's grandest temples, before the largest crowd to attend an Olympic women's soccer game, the U.S. won gold for the third consecutive time.

Don't call it revenge, however. Wambach stressed how much the Americans and the Japanese respect and even love one another, despite the lingering ache from Japan's victory in last year's World Cup. After that game, Wambach said, the U.S. team could have crumbled. Instead, it looked toward the Olympics with greater resolve than ever. Lloyd did the same when she was removed from the starting lineup before the Olympics in favor of Shannon Boxx.

She returned to that role when Boxx injured a hamstring in the opening game of the Olympic tournament. Thursday, her tenacity -- in the short term, as well as the long -- gave the U.S. its fourth Olympic gold medal in the five Olympics that have included women's soccer.

"I had to do the job," said Lloyd, who scored the Americans' lone goal in their gold medal victory over Brazil in the 2008 Olympics. "I had to seize the moment. I worked really hard. Once someone tells me I'm not going to start, I'm going to prove them wrong.

"This is huge. For me to have a second Olympic gold medal is a dream come true."

At the end of the game, Wambach wrapped herself in an American flag. For a few moments, she was as alone as she could be before a crowd of 80,203 people, as she knelt and wept at midfield. Wambach missed the 2008 Olympics because of a broken leg, and she had waited eight years to be back in this position.

After absorbing the weight of what her teammates had accomplished, she rejoined them as they walked around the stadium, carrying flags and calling out to their friends and families. Though Lloyd played the star, this had been a group effort all along.

"Carli had every opportunity to pout and turn her negativity into some sort of drama," Wambach said. "She didn't. She did the right thing. I'm so proud of Carli, because she stayed true to what this team is about. She believed in herself. We all have such belief in each other. Dreams do come true if you believe in yourself."

The day before the final, Wambach had seen Japan midfielder Homare Sawa in the athletes' village. The two players chatted about how happy they were to play each other at Wembley, ending the Olympic tournament with a much-anticipated matchup they believed would showcase the best of the women's game.

On the lush emerald pitch of England's national stadium, the U.S. had to overcome a nimble, creative Japanese side that controlled long stretches of play. They set up several fine scoring chances but could not find the net until Yuki Ogimi's rebound goal in the 63rd minute.

By that time, Lloyd had put the U.S. ahead 2-0 with her bold move in the 54th minute. She dribbled the ball about 25 yards before cutting toward the net and unleashing a shot from 20 yards out that beat the diving Fukumoto.

Lloyd said the final minutes seemed to take forever. They could have lasted even longer if not for the last of Solo's brillant saves, a sprawling stop of a point-blank chance in the 83rd minute that preserved the one-goal lead.

While the Americans celebrated at the end, Japan's players huddled and wept, then lined up and bowed to their fans. U.S. coach Pia Sundhage looked into the Wembley stands, taking in the moment. "I just embraced the feeling of what was happening," she said, "and the fact that I was standing in the middle of something big."

Big enough that President Obama posted congratulations on Twitter. Big enough, too, for Lloyd and Wambach, who both kept the faith.

"I'm so proud of this team," Wambach said. "We knew if we kept working and believing, we could stand up here together."