A penalty two minutes from time gave Racing 92 a 24-22 win over hapless Montpellier in the French Top 14 on Friday as the Paris club moved third in the table.
Young fly-half Antoine Gibert held his nerve to kick the winning points after American prop Titi Lamositele had been penalised at the scrum.
After losing two successive league games at home to Toulon and Bordeaux-Begles, it was a sixth win on the road for Laurent Travers' team.
Montpellier remain second from bottom of the table after a seventh league defeat and ninth in all competitions.
They had an eight-point lead at one stage midway through the second period on Friday after also having squeezed 12-11 ahead at the break.
A Henry Immelman penalty and three penalties from Benoit Paillaugue trumped a 35th-minute try from Racing winger Louis Dupichot and two Maxime Machenaud penalties.
Montpellier winger Gabriel Ngandebe crossed for a converted try after 53 minutes, just after Machenaud's third penalty success.
Young centre Olivier Klemenczak grabbed Racing's second try on the hour mark, converted by Gibert.
Gibert had the final say with the late, game-deciding penalty.