LONDON (CNN) -

She didn't even know she had produced one of the most dramatic goals in U.S. women's football history until the crowd and her teammates went crazy.

With the match between the United States and Canada just seconds from going to penalty kicks, American Alex Morgan outleaped a Canadian defender and headed a Heather O'Reilly cross over goalkeeper Erin McLeod to give the U.S. a thrilling 4-3 extra time victory on Monday.

"I didn't even see it go in," Morgan said. "I just try and be in the right position."

Three times, the Canadians took a one-goal lead, as their star Christine Sinclair scored in the 22nd, 67th and 73rd minutes. But Megan Rapinoe of the U.S. netted twice and Abby Wambach scored a penalty kick after a disputed call to send the match into extra time.

"We are unwilling to give up and that says a lot about who we are as a team, what our goals are," Wambach said. "Even when Canada scored their third goal there was something in me that knew that we had more, that we could give more. I know that this team has belief in itself, even when the going gets tough."

The Canadian players said the referee helped the U.S. win.

"She actually giggled (when awarding the penalty) and said nothing," Sinclair said. "Classy! In an important match it's a disappointment that the referee had such an impact on it. We feel cheated."

The U.S. will meet World Cup winners Japan in Thursday's final at Wembley Stadium, a rematch of last year's Cup final in which Japan won the penalty-kick shootout 3-1.

The Americans have won three of the four previous gold medal matches. At Beijing, the U.S. beat Brazil 1-0 on an extra time goal.

The U.S. men's basketball team pulled away from Argentina in the third quarter and won 126-97 to set up a quarterfinal match against Australia, which finished fourth in its group.

Kevin Durant led the Americans with 28 points. LeBron James had 18, including the first seven U.S. points of the third quarter. The Americans only led 60-59 at halftime, but outscored the Argentines 42-17 in the third period.

While the Olympics continue for Team USA and the American women, a legend's career has come to an end.

Michael Phelps, the most decorated Olympian in history, said Monday that he really means it when he says he is retiring.

"I'm done. I don't know if people really believe me, but I am actually finished. I'm retiring," he told CNN's Becky Anderson.

"D-O-N-E. Done," she pressed.

"Yes -- I'm done," he insisted.

Phelps, the U.S. swimmer, not only shattered the record for the most medals ever won by a single person at the Olympics -- with 22, including 18 golds -- but also made history as the first swimmer to win gold in two different events in three consecutive Olympics.

On Monday, he also defended the gold medal-winning swimmer Ye Shiwen, who has been suspected -- without proof -- of doping after her remarkable victories.

"It's kind of sad that people have a great swim and that's the first thing they say," Phelps said of the Chinese 16-year-old.

"People who work hard -- it shows. There are people who just jump to that conclusion sometimes, and it's not right."