After a grueling 17 days, Rio de Janeiro cast aside early struggles with empty venues, security scares and a mysterious green diving pool to throw a huge Carnival-like party to mark the end of the Rio Olympics 2016.

While athletes like Michael Phelps and Usain Bolt gave a picture perfect performance, there were plenty of goof-ups on and off the field, worthy of anything from national condemnation to seamless gifs.

Athletes, officials, celebrities and even so called "celebrity writers" misfired in front of millions of spectators across the globe lending themselves to plenty of trolling by mere mortals of the Internet.

Here are the real highlights you have been waiting for, the Trollympics moments to remember.

The other American swimmer

The designated "bro" of the Rio Olympics, Ryan Lochte took it upon himself to outshine the entire USA contingent of 555.

Lochte was condemned as the ultimate 'ugly American abroad' for his made-up story that he and three teammates were robbed at gunpoint. In fact the four swimmers had only been stopped by security and made to pay compensation for drunkenly vandalising a gas station bathroom.

On realising he probably couldn't swim out of this one, Lochte said he over-exaggerated what happened at the gas station and acknowledged it was his "immature behavior" that got him and three teammates into a mess that consumed the final days of the Olympics.

The Olympic gold medalist was universally condemned for his behavior and and subsequently "apologised", that is, if your definition of an apology is having a PR write hundred words that you can post on Twitter or read out loud in a stony voice on TV.

And when he did read them out, they sounded worse that his SNL sketch.

Miffed with Indian Sports Minister Vijay Goel's entourage, Rio Olympic organisers threatened to cancel his accreditation if unaccredited people accompanying him did not end their "aggressive and rude" behaviour.

"We have had multiple reports of your Minister for Sports trying to enter accredited areas at venues with unaccredited individuals. When the staff try to explain that this is not allowed, they report that the people with the Minister have become aggressive and rude and sometimes push past our staff," a Continental Manager for Organising Committee, said in a letter to Indian Chef-de-Mission Rakesh Gupta.

Goel is here to "cheer" for the Indian contingent besides monitoring their requirements at the Games Village.

Goel suffered another another foot-in-mouth moment when he wished track and field athlete Srabani Nanda ahead of her event in the Rio Olympics 2016 on social media, using the image of Dutee Chand.

The minister had earlier wished gymnast Dipa Karmakar ahead of her appearance in women's vault finals, in which Goel not only misspelled her name, but also used an image of himself in the post on Twitter, instead of the athlete.

Goel spelt her name as 'Karmanakar'. Karmakar went on to miss the bronze medal by a whisker, although the feat of finishing fourth in the finals of an event in which no Indian woman had ever participated before was historic in itself.

Rehne 'De'

As India lingered on the verge of an dismal campaign at the Olympics, socialite/celebrity writer Shobhaa De decided to vent her frustration with a rather off-the-mark remark.

"Goal of Team India at the Olympics: Rio jao, selfies lo, khaali haat wapas aao (Go to Rio, click selfies, return home empty handed). What a waste of money and opportunity," she wrote.

Goal of Team India at the Olympics: Rio jao. Selfies lo. Khaali haat wapas aao. What a waste of money and opportunity.

If De thought she was expressing the views of a billion Indians through her sarcastic/cheeky comment, she couldn't have been more mistaken. While there was admittedly a lot of frustration among fans and ex-sportspersons regarding the below-par showing in the three days of Rio 2016 Olympics, the prominent thought was one of support for our Olympians.

Death face for the win

Michael Phelps knows a thing or two or twenty eight about the importance of getting into the zone before a race. Part of the process seems to be scaring the s*it out your peeps.

But Bhai!

When Bollywood actor Salman Khan was appointed the Indian Olympic Association's (IOA) goodwill ambassador for the Rio Olympics, many sportspersons were against the nomination. The appointment was seen as a suggestion that a Bollywood face is required to glorify sports.

Many from the sports fraternity spoke against the nomination, including sprinter Milkha Singh and wrestler Yogeshwar Dutt. After the dust has settled over the controversy, Khan has now proved that choosing him as the Goodwill Ambassador was not really a smart choice after all.

On 7 August, at an event launching his brother Sohail Khan's upcoming film Freaky Ali, Salman could not recall the name of the Indian gymnast, Dipa Karmakar, who became the first Indian to qualify for the vault event at the Rio Olympics.

NDTV has quoted him as saying "I thought... it was... was it Deepika? I thought she was going to win gold but she came eighth, no?" Then at the suggestion of a reporter at the event he reached the conclusion that her name is 'Deepti'.

Ironically, Bhai had earlier tweeted asking people to support the gymnast in the run up to the Olympics.

But who are we kidding, it was probably his driver who tweeted that out.

Underpants protest

Olympic wrestling saw a bizarre protest where an angry Mongolian coach strip off down to his underpants.

Russia's Soslan Ramonov won the 65kg gold but his triumph was overshadowed by a chaotic end to the bronze medal match as Mongolia raged over a decision against their wrestler Ganzorig Mandakhnaran.

Ikhtiyor Navruzov of Uzbekistan was awarded the fight after Mandakhnaran was penalised a crucial point in the last seconds for taunting and running away.

Two coaches tore off their clothes in protest, one removing his shirt and the other stripping down to his underwear.

The coach of Mandakhnaran Ganzorig of Mongolia takes off his clothes as he protests after the match against Ikhtiyor Navruzov. Reuters

"This was a protest. There was a problem with the refereeing," said Mongolia coach Byambarenchin Bayaraa. Both coaches were eventually escorted out by security.

A pool of 'farts'

The water in one of the Olympic pools turned bright green, baffling competitors in the women's 10 metre synchronised event, who said they could not see their partner underwater.

The mysterious shade of the water, which contrasted sharply against the blue of the water polo pool beside it, was also clearly visible on television to millions of viewers around the world, many of whom joked about algae and dye on social media.

The international swimming federation (FINA) blamed a lack of chemicals in the system.

The water of the diving pool appears a murky green, in stark contrast to the pool's previous day's color. AP

Clean-up efforts also failed at the pool, which smelled like a "fart", according to one diver.

Olympics organisers said they would pump millions of litres of green water from the Rio pool, after admitting defeat in attempts to get it back to blue.

Kicking 'cowards'

The US goalkeeper Hope Solo was the lightning rod of the tournament, irking fans in the South American nation when she posted a photo of herself covered with mosquito netting and armed with insect repellent on social media. Fans booed her mercilessly and hollered "Zika!" each time she kicked downfield.

Then, when the three-time defending champion US team fell on penalties after a 1-1 draw with Sweden in the quarterfinals, she caused a stir when she called the Swedes "a bunch of cowards" for bunkering defensively.

Sweden's coach Pia Sundhage, who led the US team to gold medals in Beijing and London, replied by stating: "It's OK to be a coward if you win... “I’m going to Rio, she’s going home.” Burn.

Miller, a 22-year-old from the Bahamas, took an early lead, then held off Felix's charge along the straightaway. Neck-and-neck with two steps to go, Miller sprawled and tumbled across the line to win by .07 seconds.

Now, instead of a coronation for Felix, it's a celebration for Miller, who finished second to the American at last year's world championships.

Her dive will go down as one of the most dramatic images we've seen at these, or any, Olympics.

Shaking it off

Egyptian judoka Islam El Shehaby was jeered out of the Olympic arena after refusing to shake hands with his Israeli opponent Or Sasson, or make the customary post-bout bow.

Egypt's Islam El Shehaby declines to shake hands with Israel's Or Sasson after losing during the men's over 100-kg judo competition. AP

The snub reverberated beyond the bounds of Rio, with the International Olympic Committee saying the Egyptian Olympic committee "strongly condemned" El Shehaby's action and he was given a strong reprimand.