After resting its stars and suffering an upset loss to Costa Rica in its final group match, Colombia looked set to pay the price of a quarterfinal meeting with Brazil, a country it has beaten just three times in 28 all-time meetings. A dramatic final day in Group B prevented that from happening, but Colombia would be wise not to overlook the side it will take on Friday instead at a sold out MetLife Stadium in East Rutherford, New Jersey.

Rather than a repeat of the 2014 World Cup quarterfinal, won by hosts Brazil in the last moment of joy before its nightmare against Germany, it will be Peru that stands between Colombia and a place in the Copa America semifinals for the first time since 2004. It took a hugely controversial late goal, scored blatantly by the arm of Raúl Ruidíaz, to give Peru the decisive win, but that shouldn’t disguise Brazil’s regression and the threat posed by Peru.

The result simply reinforced how far Brazil has fallen from the “Jogo Bonito” playing all-conquering Brazil of old. Peru, meanwhile, fueled by a young side, has simply continued a fine record in South America’s championship.

For a country that hasn’t reached a World Cup since the tail end of its glory days in 1982, Peru’s results of late in the Copa America have certainly caught the eye. As well as making it out of the group stage for eight successive tournaments, the Incas have also finished in third place in the last two editions.

But having again started poorly in World Cup qualifying, taking just four points from its first six matches, expectations were modest heading to the United States. There were even more question marks when coach Ricardo Gareca responded to those dismal qualifying results by naming an experimental squad for the Copa America. Three of the country’s best-known players for more than a decade, Claudio Pizarro, Jefferson Farfán and Juan Manuel Vargas were discarded, while 11 of the 23 selected had not featured in the first six World Cup qualifiers.

But after an unconvincing 1-0 win over Haiti, secured by the one of the experienced men still remaining in the squad, strike Paolo Guerrero, Peru has impressed. It led 2-0 against Ecuador, helped by a brilliant individual goal by perhaps the star of the Peruvian next generation, Christian Cueva, before being pegged back. And in a high-pressure scenario, needing a win to progress, Peru beat Brazil for the first time in 31 years.

The young, maturing team is unlikely to be pushovers in the quarterfinals.

Colombia’s first task will be to get back on track after its impressive form was derailed unexpectedly in a 3-2 defeat to Costa Rica last Saturday. That should be achievable, given the quality of players who will come back onto the team in New Jersey. James Rodríguez , Juan Cuadrado, Carlos Bacca, Edwin Cardona and David Ospina are among those who began the clash with Costa Rica on the bench as coach José Pékerman made 10 changes to his starting lineup.

Before its rhythm was interrupted, Colombia had enhanced its credentials as one of the leading contenders to take home the Copa America Centenario title. Against the United States in the tournament’s opening game, Colombia barely got out of second gear and yet still won 2-0 at a canter.

After failing to match its performances in the 2014 World Cup at last year’s Copa America, Colombia has prospered by returning to the system that served it so well in Brazil, with James having the keys to the team in the No. 10 role and just one man up front. In the first half against Paraguay, Los Cafeteros were particularly impressive, amassing a 2-0 lead through James and Bacca before Paraguay pulled one back in the second half. A first Copa America title when not hosting the competition must now be in Colombia’s sights.

Prediction: This promises to be an intriguing contest between two sides that have won all their points in this Copa America from games in which they have come out second-best in the possession battle. Both enjoy playing on the counterattack and can be very effective at it. But in this contest, it is likely to be Colombia that will be responsible for taking the initiative, which could leave Peru with chances to hit Colombia with a sucker-punch as it did against Brazil. Still, Colombia has the greater quality in the final third, and that should eventually be decisive.

Predicted Score: Colombia 2-1 Peru