Alex Morgan scored the USA’s 123rd minute goal to send the team to the gold medal match against Japan in London in their semifinal game against Canada.

But in a back and forth match where the USA had to come from behind several times, it was out Olympian Megan Rapinoe who scored the first two goals, one off of a corner kick and the other a strike from distance.

Abby Wambach scored the third equalizer with a penalty kick that was not earned without controversy. Captain Christine Sinclair had a hat trick, scoring all three goals for Canada.

The final match against Japan will be Thursday, August 9 at 2:45 ET on the NBC Sports Network.