Nigeria eased to a 3-0 win over Cuba but Ghana lost 1-0 to Spain in their second group matches at the Under-20 World Cup in Turkey on Monday.
It was the Flying Eagles' first win, taking them third in Group B, and they can advance to the last 16 with a win over South Korea on Thursday.
Although bottom of Group A after a second loss, Ghana may advance if they beat the United States on Thursday.
That would give them a chance of being one of the best third-placed sides.
Nigeria's win over Cuba was secured thanks to a brace by Aminu Umar and captain Abdul Ajagun's third goal of the tournament.
The Flying Eagles opened the scoring when Olarenwaju Kayodefed fed Umar for an easy tap-in with 19 minutes gone.
Four minutes later, Abdullahi Shehu drilled a cross which Umar flicked between his legs for a clever strike.
Victory was completed in the 67th minute when Kingsley Madu's cross was headed home by Ajagun.
In Monday's other Group B game, South Korea drew 2-2 with Portugal.
Spain, one of the favourites for the tournament, appeared unsettled by Ghana's pressing style but still emerged 1-0 winners and are through to the next stage.
The only real chance for Spain came in the 13th minute when Denis Suarez took a long ball and sent a pass to an unmarked Jese who tapped it in.
Ghana had the better chances in the second period but failed to finish them off.
A header from Frank Acheampong went wide in the 55th minute and shortly after Richmond Yiadome Boakye spun around and fired his shot just over the goal.
Ghana's Sellas Tetteh praised his players' 'brave' effort and blamed the poor finishing on his side's inexperience.
"You never call it over until it's over," Tetteh said.
"That is the game of football. There is nothing that is impossible. We will give it our final shot."
In the earlier Group A match, France took the lead against the USA when Auxerre striker Yaya Sanogo scored from the penalty spot but Luis Gil grabbed an equaliser with a 85th minute free-kick.
The 1-1 draw boosts USA's qualification hopes.