Olivier Giroud made up for a missed penalty with a fine last-minute winner to hand Montpellier a 1-0 win at Nice and keep in touch with Ligue 1 leaders Paris St Germain.
With PSG winning at Brest, Montpellier needed to match their result to keep the gap at three points and with only seconds remaining Giroud, who missed from the spot after half an hour, beat Nice's outstanding goalkeeper David Ospina with a 20-yard strike.
Ospina moved well to get hands on the goalbound shot but could not cling on and instead saw the ball loop over the line.
Montpellier, as expected, made the early running and went close through Marco Estrada's 11th minute volley, which was well saved by Ospina.
The keeper was again needed in the 22nd minute when Remy Cabella and Geoffrey Dernis combined on the edge of the area, with the latter's effort saved on the line.
Ospina continued to single-handedly defy Rene Girard's side, saving Giroud's spot-kick after Dernis was fouled in the area by Kevin Anin.
A first chance for Nice followed soon after, Franck Dja Djedje's effort beaten away by Geoffrey Jourdren.
The second half saw Montpellier dominate as they poured forward in search of the breakthrough.
Within seconds of the restart Cabella had delivered a surging run and shot, as well as crossing dangerously towards Giroud, whose well-timed volley again required Ospina's attention.
Cabella was the dominant figure in the match at this point, with all of Montpellier's play going through him.
He saw a stunning effort clawed back off the line after 58 minutes and set up Estrada in the final two minutes but Ospina's efforts looked likely to be enough.
Then, in the final minute, Garry Bocaly located Giroud just outside the penalty box and his strong shot had enough on it to finally beat the excellent Ospina.