Hosts France became the first team at Euro 2016 to qualify for the knockout stage thanks to a late 2-0 defeat of Albania on Wednesday, with last-gasp goals from supersub Antoine Griezmann and new national hero Dimitri Payet.
"It's always difficult against teams that keep it tight. Once we finally got going we let go a bit, albeit slightly late in the day," said France coach Didier Deschamps.
"Albania played with a lot of heart and spirit. They defended well and have the ability to counterattack. We might have scored earlier, we had a lot of chances. While it was goalless, it was a good result for Albania."
Deschamps was full of praise for Payet, who is now tournament joint top scorer with two goals.
"Payet has become more consistent. He's always had ability and a lot of confidence. Now, in one-on-one situations and challenges, he's always up for the fight."
The never-say-die win in Marseille gave hot-and-cold France six points from two games, two points ahead of Switzerland atop Group A.
Earlier, Switzerland battled out a 1-1 draw with Romania. Switzerland have four points, Romania one and neophytes Albania - who are playing in their first ever major tournament - none at all.
France and Switzerland will face off for top spot Sunday in Lille, with the hosts needing just a draw to finish first. Meanwhile, Romania and Albania will clash in Lyon.
Before the match - which was France's first competitive game in Marseille since the 1998 World Cup - coach Didier Deschamps raised eyebrows by making two changes to his team despite their winning start 2-1 against Romania. Paul Pogba and Griezmann were replaced by youngsters Kingsley Coman and Anthony Martial.
However, the experiment flopped badly, with France turning in a dreadful first-half display without a single shot on goal - and Deschamps soon had to bring back Pogba and Griezmann.
The second half started with more energy and verve from the hosts, though Albania enjoyed the first clear chance, with Ledian Memushaj silencing the nervous Velodrome by hitting the French post from close range.
France dominated from then on, with Olivier Giroud heading against the post and Pogba going close to breaking the deadlock. This finally happened just one minute from time, when Griezmann calmly headed in a perfect near-post centre from defender Adil Rami.
Luckless Albania poured forward in search of an equalizer and left gaps at the back, which Payet took advantage of in stoppage time to seal the win with a classy second goal, cutting inside from the left and scoring with a curling drive.
Payet has become the leader of Deschamp's team and the new idol of his country, as a result of his handsome late goals against Romania and now Albania.
"These late goals are great, wonderful," gasped a breathless Payet. "Since March, against the Netherlands [in a friendly game], we've shown that we can go out and win the games late on. We had to be patient again tonight."
Fellow scorer Griezmann said: "I wasn't really pleased to not start the match, but that doesn't matter now. What matters now is that we have won again and will be in the knockout matches. That was our aim for tonight, and that is what we have done."