Midfielder Andre broke the deadlock for the Euro 2016 finalists in difficult, wet conditions just after the half hour and Nani, celebrating his 29th birthday, scored direct from a free kick in the 89th minute.
Cristiano Ronaldo, who also missed Saturday's 1-0 defeat away to Russia, was among the regulars rested by Portugal coach Fernando Santos for the game.
(Writing by Brian Homewood in Berne; editing by Toby Davis)