The Portuguese team, who had already qualified, went ahead in the fifth minute, through a goal from Ricardo Horta, but, in the 27th minute, Kim Young-Won equalized, after an involuntary assist by Cristiano Ronaldo, and, in the 90+1 minute, Hwang Hee- chan sealed the win.
The South Koreans thus jumped into second place, benefiting from Uruguay's 2-0 triumph over Ghana, sealed by a double by Giorgian De Arrascaeta, at 26 and 32 minutes.
Portugal finished the group with six points, against four from South Korea and Uruguay, with the Asians having an advantage in goals scored (4-4 against 2-2), and three from Ghana.