Reigning world champions the United States lost 10-9 to Hungary at the Tatsumi Water Polo Centre on Wednesday - their first defeat at the Olympics since 2008 and ending the longest winning streak in women's water polo at the Games at 12 matches.
Gunning for their third straight gold in Tokyo, the U.S. women last failed to win a match at the Olympics in the group stages of London 2012, when they drew with Spain in their third game.
Their previous defeat on sport's biggest stage was 13 years ago in the final of the 2008 Beijing Olympics, where they finished runners-up to the Netherlands.
Rebecca Parkes, who top-scored for the Hungarians with three goals, fired home the winner with 45 seconds left in the final quarter, while their goalkeeper Alda Magyari made 11 saves.
"It's a huge thing to beat the world champions," Magyari told reporters. "It gives us huge energy and confidence, but we mustn't believe that we are better than anyone else. We have to take this tournament step-by-step."
Madeline Musselman scored three for the US, whose captain Maggie Steffens also found the net, despite playing with a broken nose sustained in their nervy win over China on Monday.
"We were a little rushed, a little anxious, but I'm certainly proud of the way we kind of just kept battling," US coach Adam Krikorian said.
"We need to settle down and find our legs and a little bit more patience and composure. We wish we'd finished off the game, but we'll learn from this and move on."
The defeat was not enough to knock the US off top spot in Group B and they will still qualify for the quarter-finals if they win their final group game against the Russian Olympic Committee (ROC) team on Friday.
The 10 women's teams in Tokyo are split into two groups, with the top four on each side of the draw advancing to the knockout rounds. The US will progress even without beating ROC if other results in Group B go their way.
European champions Spain were beaten 14-13 by the Netherlands in another big upset, with wing Simone van de Kraats leading the charge with six goals from eight attempts as the Dutch team earned their first win of the tournament.
Hosts Japan, who are making their Olympic debut, slumped to a second consecutive defeat, losing 16-11 to China, while fellow debutants South Africa were trounced 21-1 by Canada in the day's other matches.