Brazilian substitute Brandao scored in injury time to send Marseille into the last eight of the Champions League for the first time since winning the competition in 1993 as they ousted Inter Milan.
Inter won the second round, second leg match 2-1 at the San Siro after a hectic finish in which Marseille goalkeeper Steve Mandanda was sent off giving away a penalty even later in injury time.
Giampaolo Pazzini, who was brought down by Mandanda, dispatched the spot-kick with the last kick of the match to give the Italians victory but they still went out on away goals.
Diego Milito had earlier given Inter the lead 15 minutes from time and the match looked to be heading into extra-time until the eventful three minutes of injury time.
Almost everything in this last 16 tie happened in injury-time with Andre Ayew giving the French victory in the first leg three weeks ago with a last-gasp goal at the Stade Velodrome.
Inter coach Claudio Ranieri may well be searching for a new job after this defeat with his team out of contention for silverware and facing an uphill battle in the league just to qualify for Europe next season.
They made a blistering start and only the brilliance of Mandanda kept the scores level.
Inter captain Javier Zanetti burst down the right, cutting into the box, twice dummying a cross before picking out Wesley Sneijder, via a slight deflection, seven yards out but Souleymane Diawara and Mandanda between them sprayed their bodies in front of goal and kept the ball out.
Moments later and the hosts put together another lovely move with Dejan Stankovic releasing Sneijder down the right and his fizzed cross found Milito inside the six-yard box./
The Argentine forward made an instinctive thrust with his chest to push the ball goalwards, but Mandanda again made a stunning reaction save.
That, however, was as good as it got for the rest of the half.
Cesar Azpilicueta picked out Loic Remy from the right but the forward headed Marseille's only decent chance of the half wide.
On the stroke of half-time Sneijder curled in a free-kick that Mandanda held easily before Maicon picked out Diego Forlan but he headed wide.
If Inter had gathered up a head of steam when they came out of the blocks, the wind seemed to have blown out of their sails by the second period.
They didn't create anything resembling a chance until halfway through when Stankovic fired a free-kick from 25 yards over the bar.
In fact it was Alou Diarra who came closest with a header from a Mathieu Valbuena free-kick that goalkeeper Julio Cesar did well to claw away from his left-hand post.
But 15 minutes from time master poacher Milito struck following a goalmouth scramble at a corner.
First Walter Samuel poked the ball goalwards, it fell to Pazzini but his prod was blocked by a sprawled Jeremy Morel before the ball broke to Milito to clip home with Mandanda helpless.
That spurred on the hosts and Maicon hit an inswinging free-kick that Mandanda had to tip over the bar.
Esteban Cambiasso then had a free header inside the six yard box after some hesitant defending from the French team but he failed to hit the target.
But then in injury time Mandanda launched a free-kick long, Lucio missed his header and Brandao had just enough space to shoot home before Samuel could make a saving tackle.
Mandanda, who had been booked earlier for time-wasting, then brought down Pazzini earning a second yellow card, and the forward had just enough time to score from the spot before Portuguese referee Pedro Proenca brought proceedings to a close.