Kamel Chafni and Dennis Oliech scored as bottom side Auxerre improved their chances of escaping relegation from Ligue 1 with a vital victory over mid-table Valenciennes.
The win would have moved Auxerre off the bottom of the table had Sochaux not won against fellow strugglers Brest.
Auxerre threatened after 15 minutes as Chafni found space before pulling the ball back for Olivier Kapo whose shot was deflected by a defender and the ball went over the bar.
From the resulting corner, which was taken by Chafni, Willy Boly beat goalkeeper Nicolas Penneteau to the ball but could not direct his header on target.
Auxerre opened the scoring after 25 minutes as Oliech and Omar Kossoko combined to find Chafni on the right.
Chafni beat David Ducourtioux and Gil before firing past Penneteau at his near post.
Valenciennes' Vincent Boubakar picked up the ball just before half-time but his shot from distance was narrowly wide of the post.
Six minutes into the second half Chafni crossed for Oliech but defender Mody Traore got to the ball first only to set up Omar Kossoko but his effort at the far post was off target.
Chafni then set up Kossoko but just as he was about to have an effort on goal Traore got in to cut out the pass.
Kapo was just off target with a free-kick from outside the area as Auxerre continued to press in search of a second goal.
That goal came after 66 minutes when Roy Contout picked out Oliech and he beat both Traore and Gil before hitting a shot which went in off the post.
With 15 minutes to go Auxerre just failed to get a third when Oliech rolled the ball into the path of Chafni but his shot was off target.