Blaise Matuidi's stoppage-time header gave Ligue 1 title challengers Paris Saint-Germain a dramatic 3-2 win at Metz, who had only just fought back to draw level with two late goals.
Edinson Cavani nodded PSG in front after 33 minutes with his 30th league goal of the season, before Matuidi slotted in a second three minutes later to seemingly leave the visitors coasting towards a comfortable victory
However, Metz, who are scrapping for points to stay away from trouble at the other end of the Ligue 1 table, produced a late rally with substitute Yann Jouffre reducing the deficit not long after coming on when he curled in a free kick with 12 minutes left.
Cheick Diabate then stabbed home an equaliser after 88 minutes as the Stade Saint-Symphorien erupted, before veteran midfielder Jouffre saw his free kick cannon back off the crossbar.
PSG, though, were lifted by their escape and pressed for a winner in stoppage time, which arrived when Matuidi nodded in a deep cross from Javier Pastore to put Unai Emery's side level on points with leaders Monaco heading into the weekend's next round of matches.
The visitors dominated much of the opening exchanges and it was no surprise when they went ahead just after the half-hour as Cavani got on the end of Maxwell's cross.
Before Metz could regroup, they were further behind when Matuidi was played into the left side of the penalty area by an angled ball from Maxwell and the French midfielder beat goalkeeper Eiji Kawashima at the near post.
As the match seemed to be tailing off, Cavani shot over before Jouffre's free kick set up a dramatic finale, with Diabate then knocking a low cross from the right into the far corner past PSG keeper Kevin Trapp to level.
The German was then beaten again when Jouffre's 22-yard free kick floated over the wall, but bounced down from the crossbar.
PSG, though, snatched victory in the third minute of stoppage time when Matudi looped in a header which saw him swamped by his teammates and sparked wild celebrations from Emery and the bench.