Cristiano Ronaldo came off the bench to inspire a 2-0 win for Portugal over a resilient Andorra side that keeps alive their hopes of automatic World Cup qualification.
Portugal will be aiming to take the battle for top spot in Group B to the final round when they visit Estadi Nacional to take on Andorra on Saturday.
Andre Silva converted from close range from a Cristiano Ronaldo cross as Portugal secured a clutch 1-0 win over Hungary in Group B.
Portugal take on Hungary in a crucial World Cup qualifier at the Groupama Aréna in Budapest on Sunday.
Cristiano Ronaldo turned on the style to score a hattrick in Portugal's 5-1 win against Faroe Islands, crossing Pele for number of international goals scored.
Portugal will be looking to inch closer to claiming a place in next year's FIFA World Cup when they host Faroe Islands at Estadio do Bessa on Thursday
Third place in the Confederations Cup will be on the line when Portugal and Mexico face off in their final game of the competition on Sunday.
A place in the final is up for grabs as Portugal take on Chile in the first semifinal of the Confederations Cup in the Kazan Arena on Wednesday.
Portugal take on New Zealand in their final Group A match as they look to finish atop their group ahead of current leaders Mexico.
Russia host Portugal in their second Group A Confederations Cup match at the Otkrytiye Arena in Moscow on Wednesday.