Kevin Gameiro scored a 90th-minute winner to sink Dijon 2-1 and keep Paris St Germain on course for a first Ligue 1 title in 18 years.
Things looked to be going wrong for Carlo Ancelotti's side when they lost Mohamed Sissoko to a red card shortly before the break and then, having taken the lead just after half-time through Siaka Tiene, conceded an equaliser to Steven Paulle.
But France international Gameiro, brought on 11 minutes from time, controlled Jeremy Menez's pass and fired home at the death to seal the win and increase Dijon's relegation worries.
Montpellier kept the heat on PSG with a 3-0 victory over Caen.
Karim Ait Fana opened the scoring early in the second half and goals late on from Souleymane Camara and Olivier Giroud, with a penalty, sealed the win. The victory kept the hosts just one point behind PSG.
Yacine Brahimi's long-range equaliser earned Rennes a well deserved 1-1 draw against Auxerre which leaves them fifth.
Dennis Oliech's early goal gave relegation-threatened Auxerre the lead, which they held for nearly an hour despite mounting pressure.
But Brahimi levelled matters after his side had hit the woodwork, had a goal disallowed and been kept at bay by keeper Olivier Sorin - though Auxerre were unfortunate to be denied a late penalty.