COLOGNE, Germany (AP) _ France finally won its game of brinkmanship and a World Cup game for the first time since capturing the title eight years ago. Teetering on the edge of another embarrassing first-round elimination from the World Cup, the 1998 champion beat Togo 2-0 on Friday to advance to the final 16 for a game against Spain.

Patrick Vieira, leading the team in place of suspended star Zinedine Zidane, scored the first goal on his 30th birthday and set up the second for Thierry Henry in a six-minute span in the second half to help France advance as the second-place team in Group G with five points. Switzerland finished first after beating South Korea 2-0.

``Of course it's stressful when you don't score, and is especially when we couldn't afford to concede a goal,'' France coach Raymond Domenech said. ``But once we found out the Swiss had scored a second goal, we were much more calm.''

Vieira lifted his game after two of his worst performances ever in a French shirt against Switzerland and the Koreans.

``I was really motivated as we think we have a really good team and we don't deserve not to go to the next round,'' he said. ``You have to work hard and I am quite really happy for my performance tonight.''

Henry said he was thankful to score his second goal in two games.

``When we got into the dressing room at halftime it was a bit worrying, because you think their goalie is going to have one of those games,'' the Arsenal striker said. ``He was saving everything and you think he can only get more and more confident. But we managed to stay calm.''

Four years ago, France went tamely out in the first round without scoring a goal, losing to Senegal and Denmark and tying 0-0 with Uruguay.

It was the same pattern at this World Cup as Domenech's team wasted chances in a 0-0 draw with Switzerland and then surrendered the lead in a 1-1 tie with South Korea. The French needed a victory over Togo to reach the second round and, having wasted chance after chance, finally calmed the nerves of their fans with a performance which had been long overdue.

David Trezeguet and Franck Ribery wasted four chances between them before Togo finally caved. The French had scored just one goal in 505 World Cup minutes before the two-goal flurry in the second half.

Zidane, whose career would have ended without a France win, will be back when the French face the Spaniards in Hanover on Tuesday.

``Yes, it is a great match. I expected to play them but not in the same scenario,'' Domenech said. ``I thought they would finish second and we would finish first. But, never mind, it is a great match anyway.''

After a game played in the city where he was born, Togo coach Otto Pfister said he had plenty of reasons to stay on despite his row with the federation over bonus payments.

``Togo has a future not only at African level but also at world level,'' he said. ``We were confronted by the ex-world champion and ex-European champion. It is the class of player who makes the difference.''

Knowing another first-round elimination would be another disaster for French soccer, Domenech's team wasted no time in putting pressure on Togo and created a stream of early chances.

``We saw what France is capable of and I can assure you we are more than motivated,'' said Lilian Thuram, who set a French record with his 117th international appearance. ``If we weren't, we wouldn't have got through.''

Although they created plenty of chances, little went right for the French team before halftime and there was a tense look about Domenech's players as they went off at halftime with the game scoreless.

But the breakthrough came when Ribery went on a run and, instead of shooting, opted to feed the ball inside to Vieira. The Juventus midfielder spun to fired a powerful right foot shot past Agassa from 10 yards and the tension lifted.

``I've been right for a long time about him, when others have not,'' Domenech said. ``He is exceptional. He scored a goal and he created a goal. This does not surprise me, that's the Vieira I know. He will keep doing this for us until the end.''

There was still danger at the other end and French defender Willy Sagnol blocked a powerful, goalbound shot from Emmanuel Adebayor.

But France's problems disappeared in the 61st minute when Vieira headed on a lobbed pass from Sagnol and Henry held off a defender to score with a low right foot shot.