Following a rout in the final game of Group A, Brazil marched onto the quarterfinals while Peru was left relying on other results going its way.
Going its way they did and despite winning just one game, Los Incas qualified for the quarterfinals as the best of the third-ranked teams. To say Peru made the most of its lifeline would be an understatement.
Ricardo Gareca's men eliminated Uruguay on penalties in the quarterfinals, before ending Chile's hopes of a third continental crown in a row on Wednesday night with an impressive win.
The reward is a first Copa America final appearance since , with Los Incas taking on the hosts on Sunday afternoon.
While Peru is chasing history, Brazil's approach to the final will be a lot more prosaic. Aside from the Confederations Cup in and the Selecao has not won a major trophy in 12 years and anything but a win on Sunday would spark nationwide inquest over the state of the national team.
The omens are good for Brazil, who knocked out arch-rival Argentina with a win in the semifinals and is yet to concede a goal in the tournament. The history books also provide comfort for Brazil, who have won the Copa America in each of the four occasions it has hosted the tournament.
The hosts, however, will be without Willian in the final after the Chelsea midfielder suffered a muscle injury. Here's everything you need to know ahead of Sunday.
The Copa America final is scheduled to kick off at 4 p. One of the most famous stadiums in the world, the Maracana has hosted the World Cup final in and as well as the Copa America final in and the gold medal match at the Olympics.
The Selecao plays at home and has thrashed Peru in the group stages and while Los Incas have defied expectations so far, upsetting the hosts on home soil looks a step too far.
The last two editions of the Copa America have ended in a penalty shootout but bookmakers expect Brazil to get the job done in 90 minutes.