Nemanja Radonjic came on as a second half substitute to score in the 89th minute and earn Marseille a 2-1 win in a breathless Ligue 1 encounter with Brest on Friday.
Coach Andre Villas-Boas has now guided the former European champions to their fourth successive league win.
It lifted the second-placed side onto 28 points, five behind Paris Saint-Germain who face Monaco on Sunday.
"I think it was our best game, but also the most stressful," admitted Villas-Boas.
"Amazing. We played well, this is the first time I have nothing to complain about."
Before kick-off at the Stade Velodrome there was a moment of reflection for the 13 French soldiers killed in Mali on Monday.
The first period was fast and furious, but Marseille were left scratching their heads after 12 shots failed to reap any reward.
Dario Benedetto looked bemused after he flashed in a right-footed volley blocked by Brest keeper Gautier Larsonneur.
Morgan Sanson had earlier hit the woodwork, but despite all of Marseille's might it was Brest who arguably felt the most aggrieved not to have scored.
Their one and only chance of the first period came in the 13th minute when Irvin Cardona's shot bounced off the far post, the ball then tracing the goalline to ricochet off the near post, with Marseille keeper and captain Steve Mandanda beaten.
After the restart Dimitri Payet should have put the hosts in front with a poorly-angled shot from beside the goal - but he made up for that howler minutes later.
His long pass had Benedetto scampering after the ball, the Argentinian striker jumping over the onrushing Larsonneur with Bouna Sarr arriving on the scene with the speed to tap in and finally get the goal the hosts deserved.
That was the 27-year-old defender's first goal of the campaign and his seventh since joining the club in 2015.
Marseille's lack of finishing polish was to come back and haunt them though as Cardona slickly equalised with three minutes of regulation time left on the clock.
But in a fitting finale to a frantic encounter, Radonjic curled in the winner to follow up his first ever goal for Marseille last weekend against Toulouse.
Deep into injury timer Brest's Alexandre Mendy had his red-card rescinded by VAR.
Radonjic's late goal pushes Marseille to within five points of PSG