Hungary, who have won water polo gold at the last four Olympic games, have been knocked out of London 2012.
Going in search of their 10th gold medal in total, they were beaten 11-9 by Italy at the quarter-final stage.
The Italians will face Serbia, who won silver in 2004 and bronze in 2008, in Friday's semi-final after they beat Australia 11-9.
In the other semi-final, Croatia, who beat the US 8-2, will play Montenegro after they saw off Spain, winning 11-9.
"I feel empty - I didn't expect this game," said Tamas Kasas, who has won three golds for Hungary. "We didn't play well.
"Maybe they were stronger in the head, and congratulations for them. It was a tough loss."