PARIS — The U.S. elections last November were preceded by a divisive campaign, overshadowed by government investigations, allegations of Russian meddling and an underestimated anger at the establishment that helped a candidate gain momentum while using social media to speak directly to his supporters.

Surprising or not, all of this could also be said about Sunday's French presidential election.

Although French politics is vastly distinct from the mechanisms of Washington, there are some remarkable parallels between both nations' election campaigns that indicate that some of the factors that are shaping U.S. voter sentiment can also be found in Europe.

Anti-establishment sentiments

Three of the four politicians who are best positioned to win the French presidency do not want to be associated with mainstream politics, an indication of how skeptical French voters have become of what they consider to be the political establishment.

Trump's victory over his Republican rivals and Democratic nominee Hillary Clinton was perceived to be part of a similar trend. During his campaign, Trump repeatedly called for “draining the swamp,” referring to the political establishment in Washington.

Ironically, French voters' desire to elect an outsider has elevated candidates who spent decades as part of the establishment. Leading candidates Emmanuel Macron and Jean-Luc Mélenchon were career politicians of established parties before founding their own movements.

Nevertheless, their popularity could have a profound long-term impact on French society. Since the early 1980s, all French presidents have come from either the mainstream conservative or Socialist party. But that might change this year, upending the country's de facto “two-party system.”

Social-media campaigning

Never has social media played such a role in French election campaigns.

Whereas all candidates have been using Twitter or Facebook — centrist candidate Emmanuel Macron recently posted a photo of himself speaking to former U.S. president Barack Obama — it is far-leftist contender Jean-Luc Mélenchon who would probably win the award for most innovative social-media campaigning.

Once a candidate with almost no chance of winning, Mélenchon has managed to spread his leftist message with such success that he now has about twice as many supporters as the candidate of France's traditional Socialist party, Benoît Hamon. Mélenchon even appeared as a Hologram at various locations so that he could address supporters in multiple cities at the same time. His use of such a showy effect to gain the greatest possible attention while campaigning reminded many French people of Trump's ability to draw and captivate large audiences across the United States.

But to some voters, Mélenchon's Americanized campaign was more awkward than inspirational. “Mélenchon's hologram idea was really just a halfhearted attempt to appeal to millennials,” said 24-year-old Sam Dickson, a student who was attending a dinner gala at the French university Sciences Po Paris on Friday night. “It really only made him appear ridiculous.”

The Russia factor

Several presidential candidates in France have faced questions about their ties to the Russian government. Contrary to the accusations the Trump campaign is facing over possible links to Russia, the cozy relationship between far-right candidate Marine Le Pen and Russian President Vladimir Putin is no secret. During a meeting with Putin in March, Le Pen said she was inspired by Putin's “patriotic economic policy.”

French media have also accused conservative party candidate François Fillon of financial links between his campaign and the Russian government, allegations that Fillon disputes.

Both candidates have said they want to improve relations with Russia, and both have received support from the Kremlin.

“Russia's official media have been supporting Le Pen and Fillon for months,” said Cécile Vaissié, a Russia expert at the University of Rennes in northern France. “They have done everything they could to create the impression that there is a huge immigration problem in Europe and in France, and that France is in decadence because of gay marriages.”

Ongoing investigations

When the FBI announced that it would investigate newly discovered emails related to former secretary of state Hillary Clinton days before the November presidential election, it was widely perceived as a setback for the Democratic candidate and a potentially decisive factor in the election's outcome.

In France, criminal investigations have also had an impact on opinion polls. After conservative party contender Fillon was placed under investigation March 14 on suspicion of embezzling and misusing public funds, he dropped in the polls and has since been competing for third place with far-leftist candidate Mélenchon. Le Pen has also seen her popularity decline after she was accused of misusing European Union funds.

It is unclear how much Le Pen's and Fillon's decline in popularity has been driven by the ongoing investigations. But the debate over the investigations' impact on public opinion has striking similarities to claims in the United States that the FBI's investigations might have been responsible for Clinton's defeat.

As in Clinton's case, supporters of Fillon and Le Pen contend that the allegations of misconduct are politically motivated. More-centrist or leftist voters, however, argue that the investigations are a sign that French democracy is working.