Alivereti Raka's 79th-minute try sealed a losing bonus point for Clermont to keep them in first place in the Top 14 despite losing to Montpellier 24-19.
Raka's score keeps Clermont ahead of their hosts by a single point.
Fly-halves Camille Lopez and Demetri Catrakilis traded penalties to leave the score at 6-6 after 20 minutes.
A third strike from Lopez gave Clermont a small lead before Catrakilis was forced off in the 23rd minute and replaced by Ben Lucas.
Timoci Nagusa then went over for the game's first try to restore Montpellier's advantage after Jesse Mogg did well under the high ball to release the home side's backs. Paillaugue missed the conversion to leave the score at 11-9.
A penalty against Clermont at the scrum allowed Paillaugue to add three more points, before Lopez replied with his fourth effort just before half-time to make it 14-12.
The low-scoring second half started brightly when Robins Tchale-Watchou crashed over after Ben Mowen was stopped just short for the hosts, converted by Paillaugue.
The scrum-half's second penalty on 58 minutes put Montpellier out into a 24-12 lead and the result seemed settled, with Clermont battling to try and claw back some points on the board.
It took Raka until the dying moments to weave his over from range for a fine solo try, scoring from 25 metres out to bring Clermont within seven points before James' conversion.
Montpellier though were the victors, moving up into second place in the process.
Tries: Nagusa, Tchale-Watchou
Pens: Catrakilis 2, Paillaugue 2
Pens: Lopez 4
Montpellier: 15 Jesse Mogg, 14 Benjamin Fall, 13 Timoci Nagusa, 12 Andrew Smith, 11 Marvin O'Connor, 10 Demetri Catrakilis, 9 Benoit Paillaugue, 8 Akapusi Qera, 7 Ben Mowen, 6 Wiaan Liebenberg, 5 Paul Willemse, 4 Robins Tchale-Watchou, 3 Pat Cilliers, 2 Mickaël Ivaldi, 1 Mikheil Nariashvili
Replacements: 16 Craig Burden, 17 Schalk van der Merwe, 18 Antoine Battut, 19 Kélian Galletier, 20 Nic White, 21 Ben Lucas, 22 Robert Ebersohn, 23 Nicolas Mas
Clermont: 15 Nick Abendanon, 14 Alivereti Raka, 13 Aurélien Rougerie, 12 Albert Vulivuli, 11 Hosea Gear, 10 Camille Lopez, 9 Jean-Baptiste Bruzulier, 8 Camille Gérondeau, 7 Alexandre Lapandry, 6 Viktor Kolelishvili, 5 Flip van der Merwe, 4 Paul Jedrasiak, 3 Daniel Kotze, 2 Martinus van der Westhuizen, 1 Thomas Domingo
Replacements: 16 Iuri Natriashvili, 17 Raphaël Chaume, 18 Sébastien Vahaamahina, 19 Fritz Lee, 20 Ludovic Radosavljevic, 21 Brock James, 22 David Strettle, 23 Clément Ric
Referee: Cyril Lafon