Two goals by Andre-Pierre Gignac earned Marseille three points against Bastia to consolidate second place in Ligue 1 behind leaders Paris St Germain.
Gignac gave Marseille the lead in the first, half but Florian Thauvin equalised within a minute of the start of the second.
But with nine minutes to go Gignac earned his side victory to keep up the pressure on leaders PSG, defeat leaving Bastia in mid-table.
Marseille took the lead after 11 minutes when Mathieu Valbuena found Gignac, who faked to shoot before firing in from 20 yards.
Four minutes later Marseille went close to extending their lead when Valbuena's corner was met with a header by Lucas Mendes, but the ball came back off the crossbar.
The hosts almost profited a minute later when a clearance from Bastia goalkeeper Mickael Landreau was retrieved by Jordan Ayew.
He steered the ball towards Gignac, whose instant shot was blocked by Landreau.
Landreau was on hand again when he denied Gignac, who, set up by Ayew, dribbled past Fethi Harek and unleashed a shot which was blocked by the keeper.
Gignac almost added his second on the stroke of half-time, but when he met Valbuena's with a stunning volley on the edge of the area the ball came back off the bar.
And Marseille were made to pay for not taking their chances just after half-time as Thauvin ended Marseille keeper Steve Mandanda's long run without conceding a goal.
Thauvin was freed by Julien Sable and tried a shot from 25 yards which found the bottom corner of the net, ending Mandanda's run of 696 minutes without conceding a goal.
Three minutes later Marseille went close to retaking the lead when Valbuena's free-kick found Morgan Amalfitano near the penalty spot, but his volley was kept out by Landreau.
Mandanda proved equal to a rare Bastia attack when he saved a shot by Sable, who had been set up by Toifilou Maoulida.
At the other end Ayew pounced on a loose pass by Jeremy Choplin, but Landreau was able to make up for his team-mate's error with a save.
And nine minutes from time OM won it. Valbuena was again the provider as his pass found Gignac, who dribbled past Julian Palmieri before beating Landreau with a shot which wrapped up the win for Marseille.