Marseille kept alive their hopes of finishing second in Ligue 1 after coming from a goal down to beat Nice 2-1 at the Stade Veledrome on Sunday, while Metz were relegated.
Rudi Garcia's side are now just a point behind third-placed Monaco and two behind Lyon with two games remaining.
Only the top two qualify for next season's Champions League group stage, while third place must go through two qualifying rounds, and fourth heads to the Europa League. Marseille could also qualify for the UCL group stage regardless of their finish by beating Atletico Madrid in the Europa final on May 16.
Mario Balotelli gave Nice a dream start in the derby with the opening goal after just five minutes. The former Manchester City and Liverpool striker evaded three Marseille defenders before firing past Steve Mandanda with a fierce drive from inside the box.
Marseille were on level terms eight minutes later. Skipper Valere Germain got ahead of Dante to score his 13th goal of the season after Dimitri Payet's trickery on the left.
Marseille were denied a second after half an hour when Walter Benitez produced a superb save to deny Florian Thauvin whose shot looked set to find the back of the net.
The home side had to wait until the 72nd minute when Payet tapped home the winner after Clinton N'Jie committed the goalkeeper to give leave Payet an empty goal.
Earlier, Bertrand Traore scored twice as Lyon boosted their Champions League hopes with a 3-0 win against Troyes.
Traore's first-half brace was followed by a Maxwel Cornet strike with two minutes left as the hosts secured an eighth successive home win.
Monaco remained a point behind Lyon after Moussa Sylla's stoppage-time winner saw off 10-man Caen 2-1.
Sylla gave Monaco a 12th-minute lead but Ivan Santini equalised five minutes before half-time for Caen, who had Romain Genevois dismissed with 14 minutes left.
At the bottom, Metz were relegated after conceding twice in stoppage time in a 2-1 defeat to Angers.
Florent Mollet's 20th-minute strike looked to have settled the game but Mateo Pavlovic and Flavien Tait struck late on to confirm Metz's fate after two seasons in the top flight.
Lille scored two late goals as they beat relegation rivals Toulouse 3-2 and moved out of the bottom three.
Nicolas Pepe gave Lille the lead after five minutes but Corentin Jean soon equalised and Christopher Jullien completed the turnaround shortly before half-time.
But Yves Bissouma levelled with 10 minutes left and Pepe struck his second in the 82nd minute to earn a vital victory. Toulouse ended with 10 men as Francois Moubandje was sent off in stoppage time.
Fourth-bottom Strasbourg were beaten 2-1 at Rennes, who moved into the second Europa League spot.
Benjamin Bourigeaud opened the scoring from a 14th-minute penalty and Adrien Hunou added a second just before the hour mark, with Dimitri Lienard pulling one back for the visitors. Strasbourg are a point above third-bottom Toulouse.
Bordeaux came from behind to win 3-1 at St Etienne and keep their slim European hopes alive.
Remy Cabella's spot-kick gave the hosts the lead but Younousse Sankhare quickly levelled. Jules Kounde made it 2-1 nine minutes before half-time and Malcom wrapped up victory deep into stoppage time.
Montpellier remained above Bordeaux in eighth courtesy of a 2-0 win at Nantes, while Dijon beat Guingamp 3-1 at home.