Portugal was already through to the quarterfinals as Group A winner, but the result at least meant that tournament co-host Switzerland could end the tournament on a high note despite an early elimination that followed losses in its first two matches. Yakin opened the scoring at St. Jakob Park after a flicked pass by fellow striker Eren Derdiyok in the 71st minute, shooting through the legs of goalkeeper Ricardo from about 14 meters (yards).
The striker added his second goal from the penalty spot in the 83rd after Fernando Meira was adjudged to have fouled substitute Tranquillo Barnetta. It sealed Switzerland's first win in three European Championship appearances, albeit against a Portugal team that rested eight starters including Cristiano Ronaldo and Deco.
Switzerland failed to win a match at the 1996 tournament in England and also in Portugal four years ago, gaining just one draw in each. Until Yakin's goals, Portugal winger Nani had missed probably the best chance in the 53rd when he shot wide when one-on-one with goalkeeper Pascal Zuberbuehler, who started in place of usual No. 1 Diego Benaglio.
The veteran Zuberbuehler, who is retiring after the tournament along with coach Koebi Kuhn, then saved well five minutes later from a low 20-meter (yard) shot by winger Ricardo Quaresma. Switzerland almost stumbled into the lead in the second half when Derdiyok's cross was bundled just past the post by defender Pepe, who nearly scored an own goal. The home side came even closer in the 65th as Gokhan Inler hit the outside of the post with a rocket shot from 25 meters (yards).
Portugal, which was runner-up four years ago and reached the final four of the 2006 World Cup in Germany, will play Austria, Germany or Poland in the quarterfinals on Thursday. The Portuguese had little to worry about after winning 2-0 against Turkey and 3-1 against the Czech Republic, who met in the other Group A match to decide second place. Turkey scored two late goals to win 3-2 and qualify alongside Portugal, leaving Switzerland to finish last in the standings.
Portugal should have scored in the first half, having a goal ruled out by a dubious offside decision and being denied a seemingly valid penalty.
Stephan Lichtsteiner got away with barging striker Helder Postiga in the area in the 15th, and Portugal went close three minutes later when Zuberbuehler pushed Pepe's flick from a free kick by Nani onto the crossbar.
Postiga then had the ball in the net after 36 minutes, but Austrian referee Konrad Plautz whistled for offside even though replays showed Postiga to be level with right back Stephan Lichtsteiner when the pass was played.
Nani and Quaresma caused Switzerland numerous problems by constantly switching wings, while the Swiss showed their usual tenacity in the center of the pitch from Gelson Fernandes and Gokhan Inler. However, the co-host also displayed a lack of creativity up front, not least because of the inclusion of winger Johan Vonlanthen over regular playmaker Barnetta - who was carrying an injury. But the late goals at least meant that the Swiss, who were beaten 1-0 by the Czechs and 2-1 by the Turks, gave their fans something to cheer before bowing out of the tournament.