Defender Ahmed Hegazi scored in the 67th minute as Egypt edged past Panama 1-0 in the Under-20 World Cup in Colombia on Monday.
Hegazi headed home a free-kick taken by striker Aly Fathy in Barranquilla.
Egypt controlled the match from the start and had most of the significant scoring chances - they now have four points after two matches in Group E.
Striker Mohamed Salah came close in the 20th minute when his shot was deflected on to a post by a defender.
Despite the victory the Egypt coach El Sayed Diaa was not happy.
"I'm upset because in the first half we missed too many chances," he said.
"You miss chances and then you can end up allowing a goal any time.
"But I'm happy with the second half and because we are 90 percent into the second round."
One of Panama's best chances came from forward Cecilio Waterman in the 30th minute.
He sped past several defenders and fired a right-foot shot from inside the area that was barely saved by Egyptian goalkeeper Ahmed Elshenawi.
"They are physically stronger and took advantage of that," Panama coach Alfredo Poyatos said of Egypt.
The Egyptians opened with a surprising 1-1 draw against four-time champion Brazil, while Panama drew Austria 0-0.
In the other Group E game Brazil easily beat Austria 3-0.
Those results mean that both Brazil and Egypt have four points while Austria and Panama have a point each.
Egypt's final group game is against Austria while Panama will face Brazil on Thursday - the top two from each group go through to the second round plus the four best third-placed sides.