Marseille reached the last eight of the Champions League with an away-goals victory over Inter Milan after a dramatic finale at the San Siro.
Diego Milito put Inter level on aggregate with a scrambled finish.
But with extra time looking certain, Brandao fired a crucial equaliser that put Marseille back in front overall.
Marseille keeper Steve Mandanda was dismissed for a foul on Giampaolo Pazzini, who converted the penalty - but it could not prevent Inter's exit.
Champions League failure leaves Inter boss Claudio Ranieri under serious pressure given a faltering domestic campaign that sees the Nerazzurri languishing in seventh place in Serie A and unlikely to qualify for the Champions League next season.
Both sides traded blows in the early stages with Mathieu Valbuena forcing Julio Cesar into a smart save after the Frenchman's neat turn and shot.
Inter crafted their first chance through Wesley Sneijder moments later - and it should have been the opening goal. Javier Zanetti's cutback was only half cleared by Souleymane Diawara but Sneijder, with the goal at his mercy, could only find the goalkeeper with his low shot.
It was a good stop by Mandanda, but his stop from Milito moments later was even better, producing a superb reflex save to keep out the Argentine's header.
Sneijder and Diego Forlan were withdrawn by Ranieri in a game where chances were at a premium - but Inter finally broke the deadlock through Milito.
Esteban Cambiasso's corner was only half cleared and the striker stabbed the ball in from close range after Giampaolo Pazzini's initial effort was blocked.
The goal proved a catalyst for Inter who pushed forward with greater urgency, but Cambiasso missed their best chance with a header over the bar.
The hosts paid for that miss as Brandao seized on a poor clearance by Lucio to fire a low effort under Julio Cesar in stoppage time, levelling the scores on the night and giving the French side the lead in the tie and a crucial away goal.
There was still time for more drama, with Inter awarded a penalty when Pazzini was brought down by goalkeeper Mandanda, who was shown his second yellow card.
Substitute goalkeeper Gennaro Bracigliano came on and was beaten by Pazzini's well-struck penalty - but it was the last kick of the game as the final whistle signalled an away-goals victory for Didier Deschamps's side.