Ten-man Brazil held on to win the Copa America on home soil despite Gabriel Jesus's dismissal with a 3-1 victory over Peru.
Jesus scored the decisive goal after a penalty from Peru captain Paolo Guerrero canceled out Everton's opener for hosts Brazil at Rio de Janeiro's Maracana stadium.
A last minute penalty from substitute Richarlison sealed a win for Brazil which handed the South American giants their ninth Copa triumph and first since 2007.
Jesus's evening went sour 20 minutes from time as he was sent off for a second booking.
The Manchester City striker was in tears as he left the field, making obscene hand gestures, angrily kicking a water bottle and almost knocking over the VAR booth.
Brazil's players rallied after the dismissal however to claim a battling victory.
"It's really special because we built something together," enthused captain Dani Alves.
Earlier, after a minute's silence was held for bossa nova legend Joao Gilberto -- who died on Saturday -- underdogs Peru made a confident start and didn't appear overawed by either their opponents or the occasion.
But it quickly became apparent that they were up against more accomplished players.
"It was a game in which they took advantage of our mistakes and turned them all into goals," said Peru's Edison Flores.
Peru coach Ricardo Gareca had said on Saturday they needed to prevent Brazil from dominating possession, but that was easier said than done.
Brazil started to stroke the ball around commandingly, and as they did that, they looked dangerous.
Their opening goal came from a piece of individual brilliance by Jesus, whose drag back fooled two defenders, creating space for him to cross for the unmarked Everton to drill home at the back post on the quarter hour.
Brazil were in control and playing like champions elect as Roberto Firmino found space on the left and crossed for Philippe Coutinho to stab wide.
Left-winger Everton was clever with his movement in dragging the athletic right-back Luis Advincula out of position and Brazil's left-back Alex Sandro found acres of space to put in a deep cross that Firmino headed over.
Just as it looked as if Brazil would stroll to victory, Peru went on the attack and a Christian Cueva cross hit the arm of a sliding Thiago Silva, giving Peru a penalty that was confirmed after a VAR review.
Guerrero sent goalkeeper Alisson the wrong way from 12 yards and Peru were back in it just before half-time.
But they paid for their lack of guile and experience with almost the last kick of the half as Arthur was allowed to drive at the defence from midfield following a slip from Renato Tapia that left him space to attack.
Center-back Carlos Zambano also slipped, allowing Arthur to feed Jesus in the middle of the area and the Manchester City striker made no mistake, finding the bottom corner.
Brazil had a few speculative shots at the start of the second half but Silva, Dani Alves and Coutinho all failed to hit the target.
After some wing trickery from Everton, Alex Sandro crossed but Firmino headed wide.
Brazil were in complete control at this stage as Peru could hardly string two passes together.
But the dynamic changed 20 minutes from time as Jesus was given his marching orders for a second yellow card after a late challenge on Cueva.
The onus was now on Peru to attack and Miguel Trauco brought a near post save out of Alisson while Edison Flores fizzed a volley from outside the area just wide.
But amidst a flurry of substitutions, fouls and injury stoppages, the steam went out of Peru's efforts and they were unable to exert any sustained pressure on the hosts.
Any hopes they had were extinguished when Zambrano was adjudged to have barged over Everton in the penalty area and substitute Richarlison drilled home the spot-kick into the bottom corner.