Hakan Yakin scored twice in the second half, 71 and 83pen, to beat a second-string Portuguese side as coach Luiz Felipe Scolari rested some key figures like Cristiano ronaldo, Nuno Gomes, Simao and Deco.
But that wasn't enough as the co-hosts ended fourth of the group A with only three points.
The Swiss had the first sight of goal as Valon Berhami sent an early drive that was hardly denied by keeper Ricardo.
However the Portuguese had the upper hand courtesy to Ricardo Quaresma and Nani who were very dominant on the flanks.
They went twice close from scoring but the bar rejected Pepe's header while Pascal Zuberbuhler denied Bruno Alves' attempt a few minutes later.
There was only 45 minutes to play and the Swiss had anything apart from pride to play for. They produced a fine display in the second half.
Gokhan Inler hit the outside of the post with a rocket from 25 meters. Six minutes later Yakin was sent clear and slotted the ball past Ricardo to put the home side ahead.
Substitute Tranquillo Barnetta, who made a big impact in this game, was fouled in the area and again Yakin doubled the lead from the spot to secure the full points of the game.