Right from the first whistle, the Brazilians were off to a swift and dominant start. They looked more energetic and more eager to win the gold medal than the Spaniards.
Although both sides had their chances, Brazil produced more shots than their opponents, and they deservedly broke the deadlock thanks to a wonderful effort from Matheus Cunha in the first half.
After the interval, Spain came out stronger, knowing that they needed to score to keep their hopes of winning the gold medal alive, and Mikel Oyarzabal did just that. It was all square after the equalizer, with neither side able to find a winner in normal time.
Changing things up before extra time, Andre Jardine introduced Malcom into the game, and the forward scored the deciding goal for Brazil in the 108th minute. By then, it was too late for the Spaniards to change the result, and they had to settle for the silver medal.
Without further ado, here is a look at five talking points from Brazil's victory over Spain.
#5 Richarlison misses golden opportunities for Brazil
After a misjudged clearance that saw Unai Simon clatter into Cunha, Australian referee Chris Beath decided to award the Brazilians with a potentially game-changing penalty.
Unfortunately, it was a moment to forget for Richarlison, who missed the spot-kick as he fired his shot way over the cross-bar. Given that the 24-year-old was the top scorer at the Olympics, his team surely would have expected him to easily put the ball past Simon and give Brazil the lead in the first 45 minutes.
After the break, Richalison had another brilliant chance to net his sixth goal of the competition, but he was denied by the woodwork. Fortunately for him, his side eventually emerged victorious and clinched the gold medal.
#4 Poor and tired defending let Spain down
Spain conceded both goals primarily due to a lapse in concentration and fatigue among the defenders. They have played two extra times in the past week - the first against Ivory Coast and the second against Japan - and clearly, the long and arduous journey to this gold medal match affected the Spaniards.
Towards the end of the first half, Spain's lackluster defending enabled Dani Alves to keep the ball in play and provide an assist for Cunha. The Hertha Berlin forward was initially surrounded by three Spaniards, but Pau Torres missed the ball and allowed Cunha to get past him.
Then again, in the second half of extra-time, Jesus Vallejo was outpaced by match-winner Malcom despite being closest to the long ball from Antony.
It was certainly not meant to be for Spain who looked tired and out of ideas as time passed.