PARIS (AP) -- Rod Fanni scored deep into injury time as Marseille returned to winning ways with a scrappy 1-0 victory against Valenciennes in the French league on Saturday.
Marseille picked up just two points from its previous three matches to slip behind leader Paris Saint-Germain in the title race. The win moved Marseille provisionally one point ahead of Lyon and into second place, five points behind PSG.
"I think that's the fourth time this season that we've won a match in the final seconds,'' Marseille coach Elie Baup said. "We always keep believing, right until the end.''
Right back Fanni timed his run perfectly into the penalty area to turn in left back Jeremy Morel's superb cross in the fourth minute of injury time, and with only a handful of seconds remaining, to prompt scenes of wild jubilation on the bench.
"We won this match with our hearts tonight,'' Fanni said. "I read the trajectory of Jeremy's cross, anticipated it, and this allowed me to get there ahead of the defender.''
Lyon is at Bordeaux and PSG travels to Sochaux on Sunday. David Beckham will not make his PSG debut after coach Carlo Ancelotti ruled him out of the match, saying he is still short on fitness and more likely to play at home to Marseille next weekend.
"It was very important for us to win tonight, crucial in terms of points because we keep a bit of distance from the teams chasing us and move closer to the top two,'' Fanni said. "It's good for our confidence before going to Paris, because we're going through a difficult period. We're capable of doing some very good things, and we have every chance of showing that next Sunday.''
Nice is in fourth place, three points behind Lyon and four adrift of Marseille, after securing a 1-0 win at Bastia thanks to 16-year-old striker Neal Maupay's fourth goal of the season.
Marseille had almost all of the first-half possession, but failed to create many chances. The best of them fell to striker Andre-Pierre Gignac, who looked short of confidence.
Gignac ran through down the right in the 20th minute, but had a difficult angle and his lob sailed over goalkeeper Nicolas Penneteau and wide. His best chance came in the 31st when forward Andre Ayew nodded down Mathieu Valbuena's deep cross from the right and Gignac took the ball back to goal, spun and failed to get enough power on his shot with the goal gaping.
A dull second half was briefly lit up when Fanni cut inside the penalty area and his shot deflected just wide for a corner.
"Valenciennes was well organised, it was hard to find space,'' Marseille midfielder Foued Kadir said.
It was set to be another frustrating match for the home fans until Morel swapped passes with Ayew and his pinpoint cross deflected off defender Gaetan Bong's head and landed invitingly for Fanni to push home with the outside of his boot.
"Even though we defended well, you have a feeling of regret when you lose in the 94th minute,'' Valenciennes coach Daniel Sanchez said.
Elsewhere, it was: Brest 1, Ajaccio 1; Lorient 2, Evian 1; Montpellier 1, Nancy 0, and Toulouse 2, Troyes 2.
Lorient's Jeremie Aliadiere grabbed his 10th of the campaign and striker partner Kevin Monnet-Paquet got the other goal, with Brazilian defender Betao replying late on for the visitors.
Defending champion Montpellier scored through striker Emanuel Herrera's sixth of the season.
Florian Raspentino scored for Brest early in the first half only for Kenya forward Dennis Oliech to level midway through the second half for Ajaccio.
Troyes, meanwhile, wasted a 2-0 lead and missed the chance to move out of the relegation zone.
Striker Mohamed Yattara and veteran midfielder Benjamin Nivet scored in the 78th and 83rd and looked to have secured a crucial win, but new signing Eden Ben Basat replied in the 86th and Nivet scored an own goal in the 88th as mid-table Toulouse scraped a draw.
Saint-Etienne travels to Reims in Sunday's other match.