Croatia won the men's competition for the first time since the country gained independence in 1991, and the United States won their first gold since the women's competition was introduced in Sydney in 2000.
Both teams had managed silvers, Croatia in Atlanta and the USA in Sydney and Beijing, but neither had looked down from the top of the podium.
Croatia took the men's tournament by storm, winning all eight of their matches, including Beijing runners-up USA and outside tip Montenegro in the knockout phase.
Hungary were in the hunt for their fourth consecutive gold and their 10th overall, but they were knocked out at the quarter-final stage by Italy, who went on to beat the pre-tournament favourites Serbia in the semis.
It should have been no surprise that Italy, the reigning world champions, spoiled the party for the Hungarians and Serbians, but few had backed them to make it all the way to the final.
A shock of a different sort came as the USA men's team finished eighth.
Their campaign started well with a win over Montenegro, but the Beijing silver medallists scraped out of Group B in fourth place, only to lose to Croatia in the quarter-finals, and to Spain and Australia in classification games.
Their female counterparts, however, proved worthy winners, overpowering a young Spain side in the final.
On their way to gold, the experienced team qualified second to the Spaniards only by goal difference, and beat Italy and Australia in the knockout stages.
Outstanding individual performances came from the USA's star woman Maggie Steffens, who bagged 21 goals from 27 shots in the tournament, and Serbia's Andrija Prlainovic who fired home 22 from 40 attempts.