Chaos struck the men's team gymnastics competition in London yesterday when the Japanese team was awarded the silver medal after originally coming in fourth.

Here's what went down:

Japanese gymnast Kohei Uchimura stumbled off the pommel horse in the last event of the competition, and the judges gave him a terrible score — leaving Japan in fourth place behind China, Great Britain, and Ukraine.

But the Japanese team thought the judges mis-scored Uchimura's routine, so they appealed. And that's when things got interesting.

There's a rule in Olympic gymnastics that says teams must pay a fee to make an appeal. So the Japan team gave the judges a stack of $100's, and it was totally legal.

According to Yahoo's Maggie Hendricks, who is an expert in these sorts of things, "The money is there to make sure teams don't make capricious challenges."

"A smart national governing body sends their team with an envelope of cash for this very reason," Hendricks added.

Ultimately, it's probably a good policy. But given the amount of conspiracy theories surrounding Olympic judging, the images of the Japan coach handing the judges straight-up cash is still pretty jarring.

Japan's appeal was successful, and the wad of $100s was returned:

japan cash appeal

NBC

Cash:

japan appeals olympic gymnastics decision with cash

NBC