The U.S. celebrates a goal on their way to a massive victory. (AP)

The U.S. women's water polo team will have their shot at finally winning their first Olympic gold medal.

The Americans won it the hard way, defeating bitter rivals and gold medal co-favorites Australia 11-9 in overtime. Teenager Maggie Steffens and Kami Craig scored in the first three-minute overtime period, and a stifling U.S. defensive effort did the rest.

The U.S. felt they should have had the game won in regulation, when they led 9-8 and appeared to have stopped Australia's last-gasp shot with one second to play. But the referees ruled that U.S. coach Adam Krikorian had called a timeout without the U.S. possessing the ball -- despite replays showing that an Australian player had touched it last before going out-of-bounds -- which, unbelievably, resulted in a penalty shot for the Australians.

That shot was converted, sending the match into extra time tied at 9 and generating a stream of comparisons to Chris Webber and the 1972 men's basketball final on Twitter.

But the U.S. had controlled the match for most of regulation, overturning an early 2-0 deficit behind three goals from the impressive Steffens. They led 6-5 at halftime and eventually 8-5 midway through the fourth quarter before back-to-back power play goals from the Australians evened the match at 8.

Melissa Seidemann scored with 1:40 to play to put the U.S. back in front by a goal and set up the wild finish.

The U.S. will play either Spain or Hungary in Thursday's final and will be favored against either, though not by much--the U.S. played both in the group stage and defeated Hungary by a single goal while tying group champions Spain 9-9.

The Americans have advanced to the medal rounds in all three previous Olympic tournaments, falling in the final to hosts Australia in 2000 and to the Netherlands on a goal with eight seconds remaining in the 2008 championship.