Memo Ochoa saved an early Portugal penalty for El Tri, and Javier Hernandez helped see the CONCACAF representatives into the lead when his cross resulted in a 54th-minute own goal.
But Pepe popped up to equalize in stoppage time and then Adrien Silva converted Portugal's second attempt from the spot in the first extra time period. Controversy ensued when a Mexico appeal for a penalty was denied by the referee with two minutes remaining in extra time.
Dos Santos was on the bench for the third-place match, but did not factor in the proceedings.
Mexico’s fourth-place finish was the best from a CONCACAF side since the US national team lost 3-2 to Brazil in the 2009 Confederations Cup final.