Panama produced one of the most famous results in their history by holding Brazil to a 1-1 draw in a friendly in Porto.
Brazil had won six games in a row since their disappointing World Cup quarter-final exit to Belgium but could not break down the stubborn resistance of their Central American opponents in the second half.
With an injured Neymar watching from the stands, Milan's Lucas Paqueta was given the number 10 shirt and his first start for his country, and he responded with his first goal.
But Adolfo Machado quickly equalised, becoming the first Panama player to score against Brazil in the fourth meeting between the sides, and two efforts against the woodwork were the closest Brazil came to a winner.
Manchester City's Ederson was preferred to Alisson Becker of Liverpool in goal while Roberto Firmino and Richarlison formed part of a front trio with Philippe Coutinho.
Panama had the first effort on goal in the 13th minute when Fidel Escobar shot wide, and it was a slow start from Brazil, who did not begin to threaten until midway through the first half.
Firmino planted a header just wide while, in the 23rd minute, Arthur produced a fine effort that just missed the target.
The breakthrough came in the 32nd minute when Casemiro teed up Paqueta, who still had plenty of work to do from a difficult angle but found the bottom corner.
But, if Brazil hoped that would set them on the way to a comfortable win, Panama had not read the script and were level four minutes later when Machado headed in Erick Davis’ cross, albeit with more than a suspicion of offside.
Richarlison came close to restoring the lead immediately but his header from Alex Telles’ cross was just wide and that proved the final chance of the first half.
Panama would have been delighted but things nearly got even better four minutes into the second half when Jose Luis Rodriguez fired towards the bottom corner and was denied by a fine save by Ederson.
That proved a wake-up call for Tite's men and they pushed hard for a second, with Richarlison hitting the bar, Coutinho shooting wide and Paqueta seeing a shot saved by Luis Mejia.
Brazil then hit the woodwork again through Casemiro, with Richarlison unable to force home the rebound, and Jose Fajardo Nelson almost scored what would have been a sensational winner for Panama at the death but hit the side netting.
Brazil face the Czech Republic on Tuesday as they continue their Copa America preparations.