A pair of late goals stole a victory in Germany for the Ligue 1 outfit and sent them through to the Round of 16 as Group F runners up.
The hosts needed to win by four clear goals and also hope for an Arsenal victory at Olympiakos in the other group fixture, and a Jakub Blaszczykowski goal coupled with a penalty by Mats Hummels gave the Bundesliga side the perfect start.
However, a header by Loic Remy on the stroke of half time made things difficult, before Andre Ayew and Mathieu Valbuena popped up with two late goals to secure their passage to the next stage and dump Jurgen Klopp's men out of European competition altogether.
The hosts had their first chance only two minutes into the contest, as Robert Lewandowski’s cross forced Steve Mandanda into a one-handed save after a deflection off Souleymane Diawara.
Chances were proving to be few and far between for BVB in the early going under a focused Marseille defence, but they were able to break the deadlock with their first real opportunity in the 23rd minute.
A throw in from the right was headed into the danger area by Sebastian Kehl, and even though Lewandowski failed to control the ball properly, Blaszczykowski was on hand to drive home the loose ball from 10 yards out.
Klopp’s men seemed reinvigorated by the goal, and Blaszczykowski was at the thick of things again in the 28th minute, putting Lucas Barrios through on goal, but the Paraguay international could only plant his finish into the side netting.
Dortmund were awarded a penalty on the half-hour mark after Stephane M’bia dropped Kehl to the turf with a boot to the face on the edge of the six-yard area. Hummels stepped up to confidently send Mandanda the wrong way and send his side two goals up.
BVB went close to a third goal five minutes before the interval after a slick move saw Mario Gotze’s shot blocked from point blank range by Cesar Azpilicueta. However, after not threatening in the slightest all game, Marseille pulled a goal back on the stroke of half time with their first attack of the evening.
Morgan Amalfitano found space deep on the right flank and sent a great cross into the heart of the Dortmund area, which Remy dived onto to send the visitors into the break with a lifeline.
With Olympiakos also leading Arsenal 2-0 in Athens at the interval, Klopp probably saw the writing on the wall as he withdrew Gotze for Ivan Perisic as the second half kicked off.
It was a less inspired Dortmund performance that ensued, and it took until the hour mark for them to register their first opportunity of the second half. Perisic made inroads on the right flank, but his cutback into the box was fired disappointingly into the arms of the keeper by Ilkay Gundogan from a dangerous position.
Despite continuing to lack any innovation in the second-half, Marseille managed an equaliser with five minutes remaining, after a corner by Amalfitano was headed in by Ayew to set up a dramatic finish for the French outfit.
On the stroke of injury time, Marseille sealed an incredible comeback with a stunning goal from Valbuena, who twisted and turned around the BVB backline before bending a stunning effort into the net from just inside the box to send Didier Deschamps’ men into dreamland.
Group F concludes with Arsenal as group winners, with Marseille joining them in the knockout stages as runners up. Olympiakos will now play in the Europa League after their 3-1 win over the Gunners in Athens, while Dortmund’s European interests have been ended completely for the season as they finish last in the group.
Follow the Champions League LIVE on Goal.com:
Commentaries, Stats, Player Ratings and much more,
Visit Goal.com Live Scores!