( dpa ) - Two goals in the last three minutes from Nihat Kahveci helped Turkey come from two goals down to beat the Czech Republic 3- 2 in their final Group A match in Geneva Sunday and set up a quarter-final clash against Croatia.
The Swiss, who had already been eliminated from the competition ahead of their final game against Portugal in Geneva, won their first match at the Euro finals at their third attempt, having previously participated in 1996 and 2004.
In Basle, the Czechs went in front on 34 minutes through a powerful header from veteran striker Jan Koller and looked to be cruising into the last eight when Jaroslav Plasil made it 2-0 on 62 minutes.
However, Arda Turan made it 2-1 with a shot from just inside the area with 15 minutes remaining to set up a tense finish.
Incredibly with just three minutes remaining, Petr Cech dropped a Hamit Altintop cross, which Nihat poked home and the Turkey captain then sealed a remarkable win two minutes later with a superb effort from the edge of the area. There was even time for Turkey goalkeeper Volkan Demirel to see a red card in stoppage time for pushing Koller.
Turkish coach Fatih Terim said that he just wanted to congratulate his players for their fantastic performance. "It was just marvellous. It was raining, but we were all sweating.
"We are in the quarter-finals and that is just fantastic."
He said he could just imagine what it would be like in Turkey. "I want to call on everybody to just go and celebrate this victory. They should enjoy what the players gave them. The players will also celebrate, they deserve it."
Turkish defender Hamit Altintop admitted that his side had played poorly. "We did not do well until we scored our first goal. Before that we never believed we had a chance.
"At half-time our coach instructed us very well, but nobody thought that it would be such a fascinating game."
Czech defender Tomas Ujfalusi said that he could not believe the side had still lost the game after leading by two goals.
"We were leading by two goals and I think after that we sat back too much and we were punished."
In Basle, Portugal's coach Luiz Felipe Scolari, whose side had already been assured of a place in the quarter-finals as group winners ahead of the game, made eight changes for the game against Switzerland.
Amongst those rested were super striker Cristiano Ronaldo and Deco.
Swiss coach Koebi Kuhn, who was in charge of the Swiss team for the last time, gave a last cap to 37-year-old goalkeeper Pascal Zuberbuehler, who announced before the tournament that he was retiring after the competition.
Although the Swiss went into the game playing only for pride, they seemed surprisingly nervous and made a number of mistakes early on, without being punished though.
The Portuguese were denied a penalty in the 15th minute when Manchester United's Nani, who was one of the players drafted into the side for the game, was pulled down in the area by Stephan Lichtsteiner, but the referee waved play on.
Shortly afterwards Pepe had a good chance after a free-kick, but Zuberbuehler pushed the ball against the crossbar.
Midway through the first half Helder Postiga had an excellent opportunity to open the scoring after being set up in the area by Nani, but his shot was saved by the Swiss goalkeeper.
The Portuguese finally had the ball in the back of the net in the 36th minute, but the referee ruled Postiga's effort offside.
In the second half, the Swiss seemed much more eager to break the deadlock and were rewarded in the 71st minute when Hakan Yakin was set up by Eren Derdiyok and the experienced striker made no mistake from close range.
Seven minutes from the end the referee somewhat surprisingly pointed to the spot after Fernando Meira and Tranquilo Barnetta clashed in the area. Yakin made no mistake with the penalty.
Portugal finish top of the group with six points from Turkey, who also ended on six points but finish behind the 2004 finalists on the head-to-head record.
The Czechs finished third with three points, ahead of the Swiss, who also had three points.