By Philip O'Connor

LILLE, France (Reuters) - Switzerland rode their luck to earn a 0-0 draw against a misfiring France to reach the knockout stage at a European Championship for the first time on Sunday as they finished second in Group A behind the hosts.

Les Bleus hit the woodwork three times, including two efforts by the impressive Paul Pogba and a spectacular strike from substitute Dimitri Payet.

Despite their failure to score, they still managed to top their section with seven points, two ahead of Switzerland.

In the group's other game, which was played simultaneously, tournament debutants Albania finished third on three points after a surprise 1-0 win over Romania, who were eliminated with one point.

The French may have gone through the group stage unbeaten, but France coach Didier Deschamps said that his side would have to up their game for the knockout stages.

"We hoped for more, but at least we have reached our first goal which was to qualify and to win the group," he said.

"I'm not blind, I can see we need to do better than that. Switzerland did good things technically, but the best chances were for us.

"Had we been more realistic and a bit more lucky, we would have won this game. Now a second competition is starting, in which we need to step up a gear."

In the next round, France will take on a third-placed team in the last 16, while Switzerland will play Group C runners up -- possibly Poland or Germany.

Wasteful in front of goal here, the French will have to be more clinical in their finishing if they are to repeat their 1998 heroics, when they won the World Cup on home soil.

France goalkeeper Hugo Lloris equaled the record of Deschamps, who captained that 1998 side, by skippering Les Bleus for the 54th time, but it was his Swiss counterpart Yann Sommer who was the busiest in the first half.

"We had the chances to win this game but we're first in the group," said Pogba.

The Juventus star was imperious in the first half on his recall to France's starting lineup after being relegated to the bench in the previous game against Albania.

Sommer had to push two Pogba shots away for corners in quick succession early on and the midfielder then unleashed a dipping shot that rattled the top of the bar.

FIVE CHANGES

One of five changes to the France team saw Andre-Pierre Gignac replace striker Olivier Giroud, who risked suspension if he picked up another yellow card.

Switzerland made one change from the side that started their first two games, bringing in teenage striker Breel Embolo for Haris Seferovic, and they battled hard without creating too many clear chances in a pulsating first period.

At halftime the groundsmen were out attempting to repair the pitch, which was still suffering from the damage sustained in the first game here between Germany and Ukraine a week ago.

It was a also tough night for the kit men with at least four Switzerland shirts getting ripped and the match ball being punctured by one of Swiss midfielder Valon Behrami's studs.

The Swiss started the second half brightly, but the first real chance fell to Gignac, who shot straight at Sommer after a surging run by Sissoko. After that the visitors appeared happy to hang on for the draw.

With two goals already at Euro 2016, substitute Payet could have decided the game in the 75th minute, but his superb volley from Moussa Sissoko's deep cross crashed against the crossbar.

Deschamps will be hoping that there is much more to come from Payet and the rest of his attackers when they enter the elimination phase in Lyon on Sunday.

(Editing by Julien Pretot and John Irish)