Paris Saint-Germain moved level on points with Ligue 1 leaders Monaco but Unai Emery's side needed a dramatic injury-time winner to triumph 3-2 at Metz despite having led 2-0 with 12 minutes to play.
Edinson Cavani and Blaise Matuidi gave PSG a comfortable lead as the visitors controlled the opening half on Tuesday, and with time ticking down there was little sign of the dramatic denouement to come.
But substitute Yann Jouffre bent in a delightful free-kick to get the home side back into the game and another replacement, Cheick Diabate, turned home a low cross to complete what appeared to be a brilliant comeback for the relegation-threatened hosts.
Jouffre then hit the crossbar with an injury-time set-piece from similar range in a sensational finale at the Stade Saint-Symphorien, but the drama was not over there as Javier Pastore's cross was superbly headed home by Matuidi.
Leaders Monaco have a game in hand over PSG, but collecting an eighth successive away league win in such stunning fashion could prove to be a decisive moment in the title race.