Nate Scott

USA TODAY Sports

RIO DE JANEIRO — Japanese players fell to the ground at the sound of the final whistle, some in tears. They had done it.

Japan shocked New Zealand in a thrilling Olympic rugby sevens match on Tuesday at Deodoro Stadium, winning 14-12 and upsetting one of the top teams in the world in the process.

Japan set the tone early, attacking the New Zealand side with pace and tenacity. The New Zealand team made a few mistakes of its own, and seemed unprepared for the energy of the Japanese side on a hot and muggy Brazilian day.

After taking a 7-0 lead, Japan fell behind 12-7, but came roaring back with a try. It all ended with a tense final minutes which saw the New Zealand side repeatedly charging ahead for tries, only to be stopped time and time again.

Rugby sevens Olympics: What you need to know

Japan was finally able to bat the ball out of bounds to end the game, and the crowd erupted at the upset.

In the HSBC Rugby Sevens Series, New Zealand is currently ranked No. 3 in the world, trailing only Fiji and South Africa. Japan is ranked 15th of the 19 total teams that have a ranking.

Last year in the Rugby World Cup, a Japanese team pulled off a similarly stunning upset, beating South Africa in what some considered the biggest upset in the history of the competition.