Marseille twice fought back from a goal down before Mamadou Niang struck deep in added time to give them a 3-2 win at St Etienne and a place in the French League Cup quarter-finals on Wednesday.
Ligue 1 strugglers St Etienne opened the scoring through midfielder Bakary Sako on 18 minutes and led 2-1 at the half-hour courtesy of Argentine forward Gonzalo Bergessio.
Marseille, however, levelled each time, with goals by Brazilian forward Brandao in the 29th and 59th minutes.
Extra time was looming when Senegal forward Niang, the Marseille captain, scored the winner with an angled shot from 20 metres, providing his side with a welcome morale boost before they visit champions and leaders Girondins Bordeaux in Ligue 1 on Sunday.
Second division Guingamp lived up to their reputation as Cup specialists by beating Paris St Germain 1-0 earlier in the day.
The Brittany side, who won the French Cup last season, had just had midfielder Moustapha Diallo sent off for a dangerous tackle when PSG defender Mamadou Sakho handed them the winner with an own goal on 79 minutes.
PSG looked slightly more threatening in a relatively dull game played on a frozen pitch but home side Guingamp resisted bravely before a blunder from a nervous PSG defence gave them victory.
Olympique Lyon, who were knocked out by second division Metz at this stage last season, took revenge by crushing the same opponents 3-0.
France midfielder Jeremy Toulalan showed Lyon the way by heading in from a free kick on the half-hour.
Metz's chances of coming back received a knock when they had goalkeeper Christophe Marichez sent off for handling the ball outside the box on 68 minutes. Argentina striker Lisandro Lopez then wrapped up the home side's victory with two late goals.