Kevin Gameiro scored a 90th-minute winner to sink Dijon 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 French 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.
The capital club started brightly with Javier Pastore pouncing on a loose ball and bringing a save out of goalkeeper Baptiste Reynet. Menez then picked the ball up to the left of centre 25 yards out and shifted it to his right foot before letting fly, Reynet making another smart save.
Menez and Pastore were causing problems for the hosts and Menez went close again with a first-time volley from 20 yards which flew just over the top. But Dijon almost went ahead against the run of play just after the half-hour mark when Benjamin Corgnet's volley brought a brilliant save out of PSG keeper Salvatore Sirigu.
And the visitors suffered a blow in the 41st minute when Sissoko was shown a somewhat harsh straight red card for a bad challenge on Eric Bautheac. Going down to ten men did not seem to do them any harm, though, with Tiene putting them ahead in the 49th minute. Guillaume Hoarau received the ball on the left of the area, beat Chaher Zarour and picked out Tiene to score at the far post.
Alex had a chance to double the lead but was off-target with his effort from a Nene corner, while Pastore drilled a low shot inches wide and a Nene corner dropped just over the bar. Instead Dijon equalised in the 76th minute as Gael Kakuta's corner perfectly picked out the unmarked Paulle at the far post and the defender scored from close range.
The hosts almost went in front three minutes from time when Koro Issa Kone fired over when well placed, but they were undone at the death. A PSG counter-attack saw Menez pick out Gameiro, who brought the ball under control and beat the onrushing Reynet to boost his side's title bid.