Rio de Janeiro: After a rollercoaster Olympics for the hosts, it took just one kick of a ball from Brazil’s poster boy Neymar to make a nation’s dream come true.

It is unusual for football to become the main event of the Games, but, for the most successful nation in World Cup history, the hitherto lack of Olympic gold had become an obsession.

Neymar finally succeeded where the likes of Ronaldo and Ronaldinho had failed when he coolly slotted into the top corner to edge a penalty shootout 5-4 against Germany at a packed Maracana on Saturday after a 1-1 draw.

“This is one of the best things that has happened in my life,” said the tearful Barcelona star.

It was a fitting finale that after queries and criticism of Brazilian fans’ penchant for treating every sport like football, the biggest crowd of the Games packed the Maracana to do what they know best.

“Brazil could have won (gold) medals in everything but if it hadn’t been in football then nothing would have counted,” said jubilant fan Leila Lopes da Silva, 70, to summarise the mood of a jubilant nation.

Neymar’s spot-kick also exorcised some of the demons that have dogged Brazilian football since Germany sent them packing from their own World Cup with a humiliating 7-1 thrashing just two years ago.

“This phase now has passed. We can look forward to the future more confident and more proud. Brazilian football is not dead,” said Brazil coach Rogerio Micale.

Talk of revenge was exaggerated. Not one player played in both Belo Horizonte 775 days ago and in Rio on Saturday.

However, so wounded was Brazil’s pride that another capitulation on home soil was unimaginable.

It is for that reason that Neymar was selected for the Games instead of the Copa America — where Brazil crashed out at the group stages — back in June.

The end justified the means. Neymar also struck a stunning free-kick in the final to open the scoring, taking his tally to four in the last three games.

However, it was far from a smooth ride to gold.

Neymar was roundly criticised and Brazil booed off as they were held to 0-0 draws by South Africa and Iraq in their opening two games.

One young boy’s decision to scratch out Neymar’s name on the back of his shirt to replace it with captain of the Brazil women’s team Marta went viral.

“Now they’ll (the critics) have to swallow what they said,” added a vengeful Neymar.

Fast forward two weeks and a packed Maracana serenaded him with chants of “ole, ole, ole Neymar.”

The winning penalty capped a tumultuous two years for Neymar. He missed the 2014 semi-final humiliation in Belo Horizonte having narrowly avoided being paralysed by a challenge that broke two bones in his back during a bruising quarter-final clash with Colombia.

Since then he has established himself as undoubtedly one of the best players in the world and won the Champions League and two La Liga titles with Barcelona.

Yet, his success on the pitch has been overshadowed by off-field scandal. Prosecutors in both Spain and Brazil have come after he and his father on charges of tax fraud.

His tricky relationship with the media looks set to continue. In the midst of Saturday’s celebrations he announced he no longer wants to captain the national team, seemingly scarred by the backlash he suffered at the start of the tournament.

However, for now, he has delivered the gold a host nation in need of a hero most desired.