Coupe de la Ligue holders Paris Saint-Germain needed a late show to overcome Ligue 2 Ajaccio and seal a quarter-final spot.
The French champions came from a goal down to defeat Olivier Pantaloni's side at the Stade Francois Coty, with Serge Aurier and Jean-Christophe Bahebeck securing victory late in the second half.
Ajaccio were rewarded after withstanding growing pressure from the visitors as they were given a penalty just before the half-hour mark, which was duly tucked away by Johan Cavalli.
Edinson Cavani restored parity for Laurent Blanc's side early in the second period, who were without the rested Thiago Silva and Zlatan Ibrahimovic for the clash and had lost their previous two fixtures.
The game grew frantic as both teams searched for a decisive second, but it was the Parisian giants who edged it as they grabbed two goals in the space of five minutes.
Substitute Bahebeck whipped in an inch-perfect corner to the head of Aurier with 10 minutes remaining, before the winger got on the scoresheet himself to put the result beyond all doubt.
Despite a bright start from the hosts, PSG - who had previously won just five of their 13 away games in all competitions - soon began to assert themselves, and could have gone ahead in the 15th minute, but Clement Chantome could not convert Adrien Rabiot's delicate delivery.
However, it was Ajaccio who took the lead in the 27th minute when captain Cavalli fired in from the penalty spot after Aurier had felled Mouaad Madri just inside the box.
Although PSG pressed for an immediate leveller, Ajaccio were a threat on the break, with the impressive Madri a consistent thorn in the Parisians' side.
PSG did manage to create an opening just prior to the interval as David Luiz connected with Ezequiel Lavezzi's free-kick at the near post, though the Brazilian's header sailed narrowly over.
PSG's pressure continued into the second half as Lavezzi drifted a set-piece towards the head of Aurier, but the full-back somehow failed to connect and the ball looped off the woodwork before falling into the grateful arms of Anthony Scribe.
But the visitors were deservedly level when Lucas Moura played in Cavani in the 55th minute, and the Uruguayan slotted coolly into the left-hand corner for his 13th of the campaign.
Ajaccio defender Cedric Kante was in impressive form to prevent Cavani scoring a second with just over 15 minutes remaining, while Madri went close for the hosts with an ambitious long-range strike that curled just wide.
It was PSG who snatched the lead in the 80th minute, however, when Aurier made amends for his earlier mishap to head in at the near post from Bahebeck's whipped corner.
The home side again pushed on in hope of forcing extra time, but they were undone again just four minutes later when Lucas broke down the left and crossed to Bahebeck, who slid in to tap home at the back post.