During the chaotic final frame, Spain broke the deadlock in the 81st minute before the Swedes equalised, but Spain struck again in the 90th minute from a short corner to extend Sweden's wait to lift the World Cup trophy by at least another four years.
Sweden, who at world number three were the highest-ranked nation in the last four, were appearing at their fifth World Cup semi-final.
They have played in all nine editions but only reached the final once, when they lost to Germany in 2003.
Their defending throughout the 2023 tournament had been tremendous, and they often forced set pieces from which they profited handsomely.
But after a fourth World Cup semi-final defeat, it will be cold comfort for a team that is forever coming up short at a time when nations like Spain have caught up and are already passing them by.
Persons:
Sweden's Magdalena Eriksson, Amanda Ilestedt, Molly, Read, Peter Gerhardsson, Olga Carmona, Philip O'Connor
Organizations:
Soccer Football, FIFA, World, England, Japan, Sweden, Thomson
Locations:
New Zealand, Spain, Sweden, Eden, Auckland , New Zealand, Australia, USA, Spanish, Germany