Adrian Mutu scored twice as Ajaccio inflicted a blow to Lyon's Ligue 1 title hopes.
Paris St Germain's three-point lead, gained by winning 4-0 in Toulouse on Friday, was sure to last the weekend after this surprising result.
Ajaccio were without a win in five league matches and perched precariously, just two points above the relegation zone, as Lyon arrived looking to rejoin PSG at the summit.
And when Lyon edged ahead early in the second half it was all going to plan for Remi Garde's men.
But Ajaccio were soon level, thanks to Chahir Belghazouani, and Romanian Mutu headed them ahead before adding a late penalty after Lyon missed a chance to equalise from the spot.
The bulk of the first-half chances belonged to Lyon, with Steed Malbranque volleying just off target, Gueida Fofana a whisker away with a 30-yard strike, and Malbranque again going close from 18 yards.
For Ajaccio, John Cavalli skimmed the crossbar with a left-footed strike from a free-kick.
Lyon went in front after 53 minutes through their promising young forward Alexandre Lacazette who met a cross from the right delivered to the far post by Rachid Ghezzal, volleying the ball back into the far corner.
Ajaccio's Ricardo Faty had a header cleared off the line in the 56th minute, but the danger remained and Belghazouani drilled a 20-yard strike low into the net.
Belghazouani played a key role in the goal that inched Ajaccio into the lead after 65 minutes, taking on Anthony Reveillere down the left and playing the ball to team-mate Felipe Saad. Saad flicked it to Mutu who dived in to head home from inside the six-yard box.
The veteran Romanian, formerly of Parma, Chelsea and Juventus, might be 34 now and in the autumn of his career, but he was agile enough on that occasion to get the better of the Lyon rearguard.
Lyon pushed forward in search of an equaliser but were almost caught by a swift Ajaccio move as Cavalli released Mutu whose attempted lob over goalkeeper Remy Vercoutre narrowly cleared the crossbar.
Their big chance of a leveller came in the 87th minute when Saad brought down Bafetimbi Gomis to give away a penalty, but Guillermo Ochoa guessed which way Gomis would shoot from the spot and produced a solid save.
In stoppage time, Ajaccio had their own penalty after Dejan Lovren fouled Dennis Oliech and Mutu left Vercoutre grasping at air.