1 of 2
The Associated Press
Socialist party candidate Frederic Barbier, casts his ballot as he votes during the second round of the legislative elections in Pont-de-Roide, eastern France, Sunday, Feb. 8, 2015. France's resurgent far right parties are vying for political gains this weekend, when the National Front is facing the Socialists in an election for a vacant seat in parliament. (AP Photo)

PARIS — The candidate of the governing Socialist Party has claimed victory in a critical election to fill a vacant parliamentary seat, and denounced the far-right National Front party of his contender as a "peril for our democracy."

All eyes were on Sunday's vote in France's eastern Doubs region which served as an electoral test after the Jan. 7-9 terror attacks in France that killed 17 victims and three gunmen.

Winner Frederic Barbier said his narrow victory over National Front candidate Sophie Montel shows the left can rebound despite a string of defeats and fend off the far right — but only if it regains the confidence of citizens.