Nine minutes before the end of regulation time, the Spanish Salma Paralluelo opened the scoring. The lead, however, was short-lived as Rebecka Blomqvist scored an 88th-minute goal to equalize for the Swedes.
This result did not last long either. In the 89th minute, captain Olga Carmona scored the goal that gave Spain the victory and the pass to the 2023 cup's final.
Spain were superior for most of the game, controlling the ball for 63 percent of the time. It also made 13 shots with a chance to score, although only two shots scored.
"We had a strong mentality. We knew it would be a mentally demanding game and we were prepared and we showed it," Spain coach Jorge Vilda told a press conference after the game at Eden Park in Auckland.
"I want to congratulate Sweden and their coach for the team they have built. They are a great team. They have worked hard and are very solid. They are difficult players to beat," he added.
On Sunday, Spain will play the final of the Women's World Cup at the Sydney stadium, where they will face the winning team of the game between England and Australia, which will take place on Wednesday.