Watch Neymar score gold medal-winning PK, give Brazil dream finish to Rio 2016

It was the ending that Brazil could only dream of. Neymar, the man that carried the weight of the Olympics host nation on his shoulders, stepped up in a penalty kick shootout and won a gold medal for his country.

Brazil’s dramatic win over Germany on Saturday marked the first gold medal for Brazil in men’s soccer and a bit of redemption for their failed World Cup campaign on their home turf two years earlier. For Brazil, a passionate soccer country, Olympic gold was an elusive prize after 12 failed tries, but Neymar & Co. broke through when goalkeeper Wéverton made a save on Nils Petersen in the fifth round of the penalty kicks and Neymar converted his.

After Neymar slotted his medal-winning effort home, he immediately burst into tears and fell to his knees. Neymar played every minute of the Olympics and was noticeably limping and out of steam by the 112th minute on Saturday, but he pushed to make it to penalty kicks.

Neymar opened the scoring on a gorgeous free kick in the 27th minute that skidded off the underside of the cross bar and in. But Brazil gifted Germany the chance that allowed Maximilian Meyer to equalize in 59th minute after two quick sloppy giveaways in their own end. An unmarked Meyer at the top of the box coolly knocked the one-time shot in. His goal was the first and only one that Brazil had conceded through the entire Olympics.

Both sides had plenty of quality chances to put the game away in regulation. In the 77th minute, Neymar slipped a perfect through-ball to Felipe Anderson, who couldn’t get his shot off quickly enough. Seconds later, Neymar fired a well-taken 25-yard shot toward the far post that curled inches wide. As Germany pushed for their equalizer, they had a slew of chances, including a couple off scrambled attempts off the crossbar. After 90 minutes, the two sides were nearly even in shots, with Brazil having one more at 12-to-11.

The game was certainly not a rematch for the World Cup in Brazil two years ago, when Germany ousted the host nation from the tournament in a humiliating 7-1 defeat. The Olympics, where men’s soccer is treated as slightly more than a youth tournament, just isn’t nearly as important as a World Cup. And none of the players who competed in that World Cup semifinal two years ago played in Saturday’s gold medal game because Neymar had been injured and Germany's Matthias Ginter never left the bench in the World Cup.

But the chance for a gold medal was an opportunity to offer at least some redemption for Brazil in another major event on home soil. The Brazilian men's team has never won an Olympic gold medal, earning silver four years ago in London and twice before that. Neymar was one of many Brazilian stars who skipped this summer’s Copa America in favor of the Olympics, seeing a gold medal as the more worthwhile endeavor.

The Olympics started slow for Neymar and Brazil, with listless scoreless draws against South Africa and Iraq to open the group stage that had fans shifting their attention to the Brazilian women’s team, which had a dazzling start. But the men found their footing and delivered lopsided blows to Denmark, Colombia and Honduras just as the women started to falter and eventually were knocked out in the semifinal by Sweden.

But for Neymar, who had been criticized for skipping Copa America and spending much his summer partying — and for Brazil fans, who had been anxious for their teams to step up, the end result was no doubt a dream come true.

MORE FROM FOX SOCCER: