Extra-time goals from Morgan Amalfitano and Loic Remy brought Marseille a hard-earned 3-1 victory over Le Havre on Saturday, sending them into the French Cup last 16 and extending their winning run to six straight games.
Ryan Mendes da Graca gave the Ligue 2 side a shock sixth-minute lead and Alexandre Bonnet came close to doubling Le Havre's advantage when his 20-yard strike was tipped over the crossbar by Steve Mandanda.
That opportunity arrived in the 62nd minute and two minutes later Marseille were level, Brandao nodding in Amalfitano's deep cross from the right.
Mandanda began his career at Le Havre but he was in no mood to do his old club any favours and in the 77th minute he produced a vital save to deny Cape Verdean forward Mendes after the 22-year-old had raced clear of the OM defence.
The visitors were to squander an even bigger chance in the dying stages of normal time, when Bonnet volleyed wide of an open goal from seven yards after Mendes had put the winning goal on a plate for him.
OM re-asserted their authority in extra time and the decisive goal arrived shortly before the interval, Amalfitano deceiving Le Havre goalkeeper Johnny Placide with a swerving shot from 25 yards.
Placide went forward for a last-minute corner but OM broke and Mathieu Valbuena squared for Remy to put the seal on a victory that was anything but straightforward.
Marseille's reward is a trip to fourth-tier Bourg-Peronnas, who overcame Ligue 1's bottom club Ajaccio 3-2 on Saturday.
Earlier on Sunday, late goals from strikers Bafetimbi Gomis and Lisandro Lopez earned Lyon a 2-0 win against fourth-division Vendee Lucon that set up an appetising last-16 encounter with Bordeaux.
In a game played at Nantes' Stade de la Beaujoire, Lucon held out until the 75th minute against their illustrious opponents, who broke the deadlock when Gomis' shot was deflected past goalkeeper Damien Leclere.
Lisandro made the game safe nine minutes from time, finishing off a Lyon counter-attack with a right-footed shot into the roof of the net.
"We found ourselves in danger a few times, but we'd been warned," said Garde.
"I wasn't surprised. Lucon are a CFA (Championnat de France Amateur) team of quality, whose desire to play football is commendable.
"They played their match of the year, but we qualified."
On Saturday, holders Lille required an extra-time header from substitute Gianni Bruno to overcome fourth-tier side Compiegne 1-0.
The French champions will tackle northern neighbours Valenciennes for a place in the quarter-finals.
Bordeaux had a similarly narrow escape, with goalkeeper Cedric Carrasso saving two spot-kicks as they beat Creteil 4-3 on penalties after the National (third division) outfit had twice equalised to force a 2-2 draw.
Auxerre were not so fortunate, losing 2-1 at home to Chateauroux of Ligue 2.
Ligue 1 leaders Paris Saint-Germain were paired with Dijon in Sunday's draw after a 4-0 victory at fifth-tier Sable-sur-Sarthe on Friday.
PSG had needed an injury-time goal from Diego Lugano to see off fifth-division side Saint-Colomban Locmine in the previous round, but a brace each from Nene and Kevin Gameiro gave them a more comfortable margin of victory at the MMArena in Le Mans.
Montpellier, currently second in the top flight, visit Ligue 2 Tours on Monday.