Well, the Olympics have turned up. What a night this was in the Maracaña, as Brazil’s long-nursed dreams of a first Olympic football gold medal were stretched thin, wrung out a little more and then finally delivered via Neymar’s winning kick in the decisive penalty shootout.

The match itself had finished 1-1, an engrossing, decelerating affair that saw Germany equalise Neymar’s opener without ever looking like scoring again, and Brazil jab and fret and batter away rather vaguely on a gripping, slightly wild night in Rio.

Somehow, penalties had always seemed inevitable. This is, after all, Brazil, the Maracaña, and a yearning for an Olympic gold that stretches back through a series of dead ends and deadening defeats. Plus, of course, lurking a little further behind this final was The Bad Thing, that 7-1 World Cup semi-final defeat by Germany two years ago that remains an unscabbed wound. For now, victory will provide a kind of exorcism, assorted spectres and shadows and traumas set aside in the moment of shared joy; the deeper, systemic problems with Brazil’s wonderfully fecund footballing culture hopefully sharpened rather than camouflaged by the glories on show here.

The shootout itself provided a moment of unbearable drama, justification at a stoke for football’s often slightly frostily received presence at the Games. The stadium winced and prayed, or buried its face in a flag. The two benches huddled on the fringes. Germany’s Matthias Ginter stepped up to take the first penalty at the Brazil end (every end was the Brazil end in this cauldron of yellow). He buried it. Renato Augusto scored, to eardrum-fuzzing cheers. So it went on, Luan making at 4-4, only for Nils Petersen to see his low kick well saved by Weverton.

Enter Neymar (of course). The stadium hushed. Brazil’s captain stuttered, seemed to think about stopping, then eased forward and buried it. Cue bedlam, as the yellow shirts in the stands leapt and howled, the players collapsed in a heap, the coaching staff gambolled and punched the air.

The relationship with Neymar in Brazil has been oddly skittish. In 2014 he was cherished as a a kind of footballing fairy-Jesus. Earlier in the tournament here his name was being crossed out on the back of shirts. After this, they’re likely to stick another statue up on the top of one of the nearby hills. Either way, it is a moment of coronation for player who has carried some fairly crushing hopes on his unshrinking shoulders, captain and leader of a team that now has a medal no other in the history of green and gold ever held.

And so, at a stroke, Brazil’s Games has its own most vital moment, a gold medal in the only sport this nation really cares about with any concerted passion. Here the Maracaña was full to the dripping, shaking rafters at the start, a huge crackle of white noise erupting around its deep, open stands as Brazil appeared before kick-off. It was by some distance the loudest, most unbound occasion of these Olympics.

The stadium flickered with camera flashes as the anthems were bellowed, the entire 360-degree bowl decked with yellow Brazil shirts. In the middle of which a gripping, high-intensity, at times slightly callow international football match broke out. Brazil were unchanged for this final, with that wide, fluid forward line of Neymar, Gabriel Jesus and Gabriel Barbosa the star turn. But it was Germany who started with more drive, decked out in 4-1-4-1 formation.

Brazil flexed their own shoulders. Neymar skittered about, playing with the freedom to run, or indeed bolt, straight at the German defence. Renato Augusto shinned a volley wide from a corner, impeded a little by Rodrigo Caio. The goal was coming, vaguely, although it took a moment of astonishing skill to beat Timo Horn from a free-kick 30 yards out and to the left.

Neymar paused over the ball for a moment, stuttered, looked down, and then simply whumped a dipping, swerving shot past Horn’s right hand and in off the underside of the bar. The Maracaña erupted with a great barrelling roar, bodies writhing around in the stands, parents swinging their children into the air, flags hurled skywards.

Germany pressed back as Brazil went to pieces a little in the moment. Sven Bender flicked a driven free-kick on to the bar. Half time passed in a low level frenzy, the home crowd still distinctly angsty. With good reason, as it turned out. Brazil didn’t settle after the break. Just before the hour Germany equalised. Jeremy Toljan sped down the right, crossed and the unmarked Max Meyer clipped the ball into the corner, a beautifully severe finish. The Maracaña fell into a hush as Germany’s coaches capered on the sidelines.

After which Brazil pressed and strained. Shots fizzed wide or hit defenders. The stadium whistled, groaned and generally gnawed through its umbrella handle. Extra time arrived with a kind of shared sigh. There were scowls and grimaces from the players as the game dripped away towards that inevitable theatre of pain. In the stairwells and walkways, people leapt up and milled about, and sat down again. The Maracaña was, briefly, beside itself, right up to its moment of deserved deliverance on the night. Germany take the silver after a fine tournament. Earlier in the day Nigeria had claimed the bronze, beating Honduras 3-2 in São Paulo. The real story here, though, is Brazil, and a home gold to lift, dazzle and generally garland the end of these Rio Games.