Mario steals the show for Nintendo at Rio Olympics closing ceremony

Phelps' biggest contribution to swimming: Money
Phelps' biggest contribution to swimming: Money

The world's most famous plumber stole the show at the closing ceremony of the Rio Olympics.

Nintendo (NTDOF) character Mario was shown jumping into a pipe in Japan before popping out in the Rio stadium in the unlikely form of Japanese Prime Minister Shinzo Abe.

The ingenious cameo drew a delighted reaction from fans on social media and appeared to give Nintendo shares a lift. The stock jumped as much as 3.5% in Tokyo, well ahead of a small increase in the benchmark Nikkei index.

Tokyo, which will host the 2020 Olympics, is picking up the baton from Rio. The idea to put Mario center stage in Rio came from the Tokyo organizing committee, said Nintendo spokesman Yasuhiko Minagawa.

mario shinzo abe nintendo
Japanese Prime Minister Shinzo Abe popped up at the Rio Olympics closing ceremony dressed as Nintendo character Mario.

"It was a great honor that Mario appeared at the Rio Olympic closing ceremony to play a role of bridging to the Tokyo Olympics while people all over the world are watching," he said.

But Nintendo isn't officially associated with the 2020 Games and won't be a sponsor, according to Minagawa.

The video game company has tried to cash in on the Rio Olympics, though. It released "Mario & Sonic at the Rio 2016 Olympic Games" for the Wii U console, featuring popular characters competing in events.

Mario has been around since he appeared as the hero of "Donkey Kong" in 1981. But he achieved legendary status through 1985's "Super Mario Bros." which spawned countless sequels and spinoffs over the decades.

The bump in Nintendo stock Monday after Mario's turn in the closing ceremony still pales in comparison with the massive boost it got from Pokemon Go.

Related: Pokemon Go arrives in Rio in time for Olympics

The hugely successful smartphone game powered the Japanese company's shares to a gain of more than 120% at one point in July. But the stock lost much of those gains after Nintendo told investors that Pokemon Go will have only a "limited" effect on its bottom line.

-- Junko Ogura contributed to this report.

CNNMoney Sponsors