It initially looked as though Cristiano Ronaldo had drawn level with Portugal’s record World Cup goalscorer Eusebio when he rose to try to head in Fernandes’ 54th-minute cross.
But replays showed that the Portugal captain, who has scored eight World Cup goals, did not get a touch on it and the goal was given to Fernandes as his team claimed a second successive Group H win.
Fernandes’ goal, followed by a penalty in added time, proved enough to turn a tight and tense contest Portugal’s way and put them in pole position to top their group ahead of facing South Korea on Friday.
Wolves midfielder started for Portugal but was substituted midway through the second half as a precaution having been booked earlier in the game.
The Molineux skipper also suffered a knock during the second half but it did not appear serious.
Uruguay, meanwhile, will need to beat Ghana in their quest for a place in the round of 16.
n Ghana breathed fresh life into their World Cup campaign with a thrilling 3-2 win against South Korea at the Education City Stadium in Qatar.
After Ghana raced into a 2-0 lead, Cho Gue-sung scored twice in three second-half minutes to haul South Korea level before Mohammed Kudus’s winner fired Ghana to their first victory at the World Cup in a dozen years.
n Casemiro came to Brazil's rescue as they left it late to secure their passage to the World Cup knockout stage with a 1-0 Group G victory over Switzerland.
The Swiss, who held the Brazilians to a 1-1 draw in Russia four years ago, looked set to repeat the feat until the Manchester United midfielder struck seven minutes from time to claim the points.
Defeat was perhaps harsh on Murat Yakin’s men, who had frustrated the five-times winners for long periods to make them feel the absence of injured superstar Neymar, although a point from their final fixture against Serbia would be enough to send them through unless Cameroon pull off a major shock against Brazil on Friday.
n Cameroon fought back from two goals down to force a thrilling 3-3 draw with Group G rivals Serbia at the Al Janoub Stadium.
Serbia struck twice in added time before the interval through Strahinja Pavlovic and Sergej Milinkovic-Savic to turn the game on its head after Jean-Charles Castelletto had given Cameroon the lead .
Serbia went 3-1 up when Aleksandar Mitrovic scored his first goal of the tournament early in the second period.
But the Africans responded in spectacular fashion as substitute Vincent Aboubakar and Eric-Maxim Choupo-Moting both scored in the space of three minutes to haul their side level.