Portugal, on Sunday won the third place play- off at the Confederations Cup in Moscow, by defeating Mexico, 2-1.
Meanwhile, the Mexican team had been leading before Adrien Silva scored an extra-time penalty for the Portuguese, to make them win the third place playoff.
Luis Neto bundled into his own net to hand Mexico a 54th-minute lead, but Pepe stabbed home a stoppage-time equaliser to force an extra 30 minutes at Spartak Stadium.
Silva then struck his first international goal after a handball inside the box on 104 minutes, while both sides finished with 10 men as Nelson Semedo was dismissed for Portugal before Raul Jimenez saw red for Mexico.
World champions Germany face Copa America holders Chile later in the final in Saint Petersburg.