By the narrowest of margins, the U.S. women's national team is heading home.
Sweden defeated the U.S. in a penalty kick shootout 5-4 after neither side scored for the first 120 minutes of the Round of 16 matchup.
With the shootout knotted at 4-4, Kelley O'Hara stepped up for the Americans but was unable to score after hitting the post. Lina Hurtig then delivered the decisive blow to seal the game for the Swedes. Her shot was deflected by U.S. goalkeeper Alyssa Naeher, but the ball carried just over the goal line on the rebound.
With seven rounds of penalties, this was officially the longest match in Women's World Cup history.
Get top local stories in San Diego delivered to you every morning. >Sign up for NBC San Diego's News Headlines newsletter.
The U.S. and Sweden were tied at 3-3 through five rounds after Sophia Smith missed a chance to seal the win for the Americans in the fifth round. The sides traded goals in the sixth round before O'Hara miss and the winning goal by Hurtig.
Local
The U.S. had advanced to the semifinal in each of the first eight Women's World Cup tournaments, as this marks its earliest elimination in history.
The loss will go down as one of missed opportunities for the U.S., who statistically outplayed Sweden through 120 minutes of scoreless action. The USWNT held the edge in shots on goal (11-1), shots (22-9), possession time (58% to 42%) and corner kicks (9-3).
The U.S. had its first scoring opportunity in the 18th minute, when Trinity Rodman fired a shot right at Swedish goalkeeper Zecira Musovic. Later, in the 27th minute, Rodman had the USWNT's second shot on goal but was once again denied.
The U.S. nearly scored in the 34th minute, too. This time is was off a corner kick, where Lindsey Horan headed the ball just over the keeper's outstretched arm but off the crossbar.
The two sides stepped up the intensity in the second half, though neither squad could put one in the back of the net.
Horan had another scoring chance in the 53rd minute, firing a right-footed shot off of Emily Fox's cross that was swatted away by Musovic.
Alex Morgan nearly had the game-winner in the 89th minute, but Musovic had the upper hand yet again.
The U.S. star attempted a header off a cross from substitute Lynn Williams. Musovic sprawled out to her right and fully extended to deny Morgan of the goal.
Sweden, the No. 3-ranked nation by FIFA, will advance to play Japan in the quarterfinals on Friday, Aug. 11.