Mr. Sarkozy announced after his party’s second-place showing that its candidates would not join with other parties or withdraw from the race.

In contrast, Jean-Christophe Cambadélis, the head of the Socialist Party, said that its candidates would withdraw from the elections in the two regions where the National Front did best, and that elsewhere it would join with other parties.

“The party of the extreme right threatens many regions of France,” Mr. Cambadélis said.

“The left is, then, the last rampart of Republican France against the xenophobic extreme right,” he said, calling on all the left-leaning parties to join together to defeat the National Front.

Ms. Le Pen and her party have thrived on an anti-immigration message that has verged on anti-Muslim, as well as a call for re-establishing European borders. These notions had already found traction as France faced an influx of Muslim immigrants from war-afflicted areas of the world. But she gained even more momentum after the attacks in Paris on Nov. 13, in which 130 people were killed.

However, several analysts said it was important not to overplay the recent attacks in explaining her success. Rather, they see a long-term trend in which the National Front has gained ground in election after election. It has done so even more rapidly since Ms. Le Pen took leadership of the party from her father, Jean-Marie Le Pen, in 2011.

“The dynamic in favor of the National Front is not a superficial reaction of the French electorate in a situation of crisis after the attack,” said Bruno Cautrès, a political analyst and public opinion specialist at the Center for Political Research at Sciences Po.

“It is something more long lasting in the French political system,” he said.

The outcome will be read here as a forecast of the politics of the presidential election in 2017, but already Ms. Le Pen has changed the tenor of political debate in France. Across the political spectrum, politicians are taking a harder line on immigration, and there is a newfound willingness to reconsider the rules that govern the open borders among European Union countries.