YOKOHAMA, Japan — The Canadian women's soccer team made history by reaching the Olympic final for the first time. Julia Grosso, with a big assist from goalkeeper Stephanie Labbé, made sure her team was on the right side of it.

Grosso's winner gave Canada a 3-2 decision over Sweden on penalty kicks Friday after the teams were tied at one at the end of regulation and extra time.

After each team scored on two of five tries from the penalty spot, Labbé stopped Jonna Andersson's attempt to set up the dramatic finish. Swedish goalkeeper Hedvig Lindahl got a piece of Grosso's hard shot but couldn't stop it from finding the back of the net.

The ecstatic Canadian players ran down the field to mob Grosso and Labbé in celebration. The dejected Swedish players gathered at midfield to ponder what went wrong.

Canada won bronze at the 2012 London Games and finished third again four years later in Rio. Sweden reached the 2016 final but settled for silver in a loss to Germany.

Stina Blackstenius scored in the 34th minute for Sweden, but Canada's Jessie Fleming equalized from the penalty spot in the 67th minute.

When the game went to penalty kicks, Fleming gave Canada an early lead before Nathalie Bjorn and Olivia Schough tallied for Sweden. Deanne Rose delivered with Canada's fifth shot to pull even.

Organizers moved the start time of this year's final to 9 p.m. (local time) from the original 11 a.m. kickoff after both federations requested a change to avoid the peak midday heat and humidity.

The venue was also moved from Tokyo's Olympic Stadium to International Stadium Yokohama, just outside the host city. It was still hot and muggy at game time, but more bearable than the sweltering conditions earlier in the day.

There were a few vocal pockets of team officials cheering on their respective sides in the mostly-empty 69,000-seat venue. Chef de mission Marnie McBean held a Canadian flag with outstretched arms during the playing of O Canada.

Neither team changed its starting lineup after 1-0 semifinal victories. Sweden went with a 4-2-3-1 formation while Canada used a 4-3-3.

Sweden attacked early and earned a corner kick in the second minute, but Labbé punched the cross away. Canada's first chance also came off a corner moments later but a header by Vanessa Gilles sailed well wide.

The potent Swedish offence used creativity and speed to keep the Canadians on their heels. Sofia Jakobsson set up Magdalena Eriksson just inside the box in the 10th minute but her shot was just outside the far post.

The Canadians often tried to build the play by using their possession skills in the midfield area before springing forwards down the wings. Nichelle Prince made a charge midway through the half but her strike was off the mark.

Labbé was tested again in the 29th minute, forced to make a solid diving stop on a Jakobsson header.

Canada's Quinn turned the ball over in the midfield shortly before the Swedish goal. Fridolina Rolfo took possession before sending Kosovare Asllani down the side.

She sent a low across to Blackstenius for a one-timer, the ball slightly deflecting off the inside of Gilles' leg and past the diving Labbé.

The eighth-ranked Canadians were confident entering the final after beating the top-ranked United States 1-0 in the semifinal for their first win over the Americans in 20 years.

Sweden entered the final with a perfect 5-0-0 mark, with Blackstenius scoring four of her team's 13 goals. Canada entered with a 3-0-2 mark and five goals scored.

Canadian coach Bev Priestman made two substitutions to start the second half. Grosso came on for Quinn in the midfield and Adriana Leon replaced forward Janine Beckie.

The changes seemed to spark the Canadians, who played with more urgency after a middling first half.

Priestman turned to her bench again in the 63rd minute by putting Rose in for Prince. The speedy forward made an immediate impact, helping set up the play that led to the equalizer.

As the ball was fed into the box, Canadian forward Christine Sinclair was taken down by Amanda Ilestedt. The seated captain raised her arms in the air with an incredulous look at the non-call.

However, referee Anastasia Pustovoitova turned to VAR review before pointing to the penalty spot. Like she did before Fleming's goal in the semifinal, Sinclair picked up the ball and gave it to the midfielder.

Fleming's strike from the spot was ideal. Her hard, low shot found the left side of the net as Lindahl dived toward the opposite post.

Sinclair, who leads all players with 187 career international goals, earned her 304th career cap for Canada. She was replaced late in the second half by Jordyn Huitema.

Asllani had a great chance before injury time with Labbé pulled out of position, but her shot was cleared wide by defender Kadeisha Buchanan. Fleming had a chance before extra time but her shot just cleared the crossbar.

Swedish substitute Lina Hurtig sent a header just wide in the second 15-minute session of extra time and Huitema did the same after some strong work by Rose on the wing.

Sweden nearly pulled ahead after a scramble in the dying minutes but Canada's back line stood firm.

Players from both teams stood arm in arm at midfield while their teammates and coaching staff did the same from the sidelines.

Asllani hit the post with Sweden's first attempt. Lindahl stopped Ashley Lawrence and Gilles hit the crossbar with Canada's third attempt.

Anna Anvegard was stopped by Labbé on Sweden's fourth shot and Lindahl made a similar diving save to deny Adriana Leon.

Swedish captain Caroline Seger had a chance to win it but her attempt went over the crossbar. Rose was followed with a strong effort into the top corner.

Canada improved to 6-14-4 in all-time head-to-head matchups against Sweden. Blackstenius scored in Sweden's 1-0 win over Canada in the round of 16 at the 2019 Women's World Cup.

The United States won bronze on Thursday with a 4-3 win over Australia.