France left it late to clinch their place in the knock-out stages of Euro 2016 as goals from Antoine Griezmann and Dimitri Payet snatched a 2-0 win over Albania in Marseille.
Griezmann, who was a surprise omission from Didier Deschamps' starting line-up, was introduced in the second half and made his presence felt with a superb headed goal before Payet rounded off the victory with his second of the tournament for the hosts.
After playing well in their opening Group A defeat to Switzerland, Albania looked set to go one better and earn a point against a France side that dominated possession, but failed to register a shot on goal until Griezmann struck.
Deschamps also opted against picking Paul Pogba from the start and his chosen 11 struggled to break down a determined Albania side that defended resolutely throughout.
Gianni De Biasi's men created a number of chances to take the lead in a brave performance, but Griezmann and Payet consigned them to a defeat which leaves them bottom of the group.
Albania started without former Marseille captain Lorik Cana, who was sent off in their defeat to Switzerland, but the defender was not missed in the early stages as his side enjoyed a spell of possession and Ermir Lenjani fired the game's first shot.
In the absence of Pogba and Griezmann, it was left to Anthony Martial and Kingsley Coman to probe for an early opening, but the Albanian defence frustrated the tournament hosts and the home support packed into Stade Velodrome.
Albania gave France a scare when Elseid Hysaj fired in a cross that took a wicked deflection off Martial's leg and Armando Sadiku was only just denied an easy goal by the alert Hugo Lloris.
As patience began to wane amongst the France supporters, Lenjani dragged a shot just wide from a corner during a sustained spell of Albania pressure, but the first half ended without a shot on target from either team.
France sent on Pogba for Martial after the break and within seconds of the restart Olivier Giroud whipped in a cross that Coman headed just wide.
Just as it looked like France were imposing themselves on the game, Sadiku delivered a raking ball into the box that Bacary Sagna would have turned into his own net had Lloris not saved well, and the rebound almost went in off Lenjani's head.
France countered, and Pogba fired over from Payet's sweetly hit cross, but the game hung in the balance after an hour.
Giroud squandered a golden chance to score when he headed Coman's perfectly judged cross wide of Etrit Berisha's goal, and a minute later he powered an almost identical chance onto the post.
Deschamps sent on Griezmann for the final 20 minutes as his side continued to press, but it was not until the 89th minute that the substitute connected with Adil Rami's cross to make it 1-0.
Payet then sent the French fans wild with another superb solo goal in injury time, cutting inside to place a shot into the net with great composure.