A fortnight ago it was too close to call. But today – barring a shock last-minute upset – French voters are expected to hand Emmanuel Macron five more years in office.

In doing so they will once again thwart the political ambitions of his challenger far right candidate Marine Le Pen.

Elections of course as the saying goes, are never over until they’re over. But ­already you can almost sense the ­collective sigh of relief that is building throughout much of Europe and across the Atlantic, at the prospect of Macron remaining ­president even if many French citizens themselves will be mightily ­displeased.

While French law prohibits any ­campaigning or the release of polls from Friday midnight until the election results are known, the final polling averages ­before today’s vote showed Macron 10 percentage points ahead of Le Pen.

READ MORE: East Lothian host family in call for overhaul of 'broken' UK Homes for Ukraine scheme

It’s a far cry from two weeks ago when international political pundits were ­agonisingly scrutinising polls after a tight finish in the first round of the election. That said, a Le Pen upset victory remains a possibility, if an unlikely one, and many still warily recall how final polls missed the result margin by nearly nine ­percentage points five years ago.

Should such an upset still occur, and Le Pen and her party National ­Rally (NR), formerly the National Front, take power, it would in the eyes of many prove a political earthquake for the EU and ­produce as much of a shock as that of Brexit and Donald Trump’s US ­presidential win in 2016.

At various points throughout this ­campaign the gap between the two rivals has been razor thin and much smaller than the 32-point margin Macron had over Le Pen in 2017, underlining just how high the stakes in this election are, not only for France, but for Europe and the United States too.

As Tom McTague, staff writer at The ­Atlantic magazine wryly summed it up last week, “a Le Pen victory would bring to power a far-right leader who is ­committed to unpicking some of the most ­foundational principles of the EU, ­undermining it from within – a ­hyper-powerful Viktor Orban with ­nuclear weapons and a Gallic grudge.”

Ever since Le Pen’s first presidential bid back in 2012 she has never hidden her disdain towards Brussels and what she saw as the “dictates of EU bureaucrats.” At the core of this antipathy is Le Pen’s belief that France’s sovereignty cannot ­coexist with EU authority and instead must leave it behind or supplant it.

As the daughter of Jean-Marie Le Pen who helped found the National Front back in 1972 and led it until Marine took over in 2011, she has never shied away from expressing admiration for Russian president Vladmir Putin – or for that ­matter Donald Trump and Boris Johnson.

This political identification with Putin especially though has come to impact ­significantly on her presidential campaign and today’s election in a way that was ­perhaps never that obvious at the outset.

In fact, there were few if any signs of it adversely affecting Le Pen’s performance in the first round of France’s complex drawn-out presidential process.

Such was Le Pen’s confidence that her association with Putin would help nor hinder her election campaign that a ­photograph of her shaking hands with the Russian leader when he welcomed her to the Kremlin in 2017 a few weeks before France’s last presidential election, made it onto one of her current campaign ­flyers.

Printed before the Russian invasion ­began on February 24, Le Pen’s aides however had to make a rapid about turn and bin what they subsequently realised was a potentially damaging election tool.

But while ridding itself of a flyer was an easy task for Le Pen’s campaign team, backtracking on manifesto pleas and pledges such as the one in which she called for an “alliance” with ­Russia ­regarding European security policy would prove far more difficult to deflect or erase.

It hasn’t helped either that Le Pen in the past has never missed an opportunity to praise Putin and his “new vision” of the world. The feeling it appears was ­mutual with the Russian leader back in 2017 at their meeting, telling Le Pen, “I know that you represent a rapidly growing political spectrum in Europe”.

Even as Russian forces were massing on Ukraine’s border in preparation for its ­attack Le Pen was still insisting that she did not believe “at all” that Russia would invade and condemned what she described as “a misunderstanding of the issues and thinking” in Russia.

As if all this was not damaging enough, lurking too in the background of Le Pen’s election bid was that other thorny issue relating to Russian bankrolling of her ­National Rally (RN) party activities, ­including her last presidential campaign in 2017.

As detailed in the French daily ­newspaper Le Monde, Le Pen and RN were able to find in Russia the kind of ­financial support that was often ­unavailable in France due to the banks’ reluctance to lend money to far-right groups.

Le Monde outlined how as far back as April 2014, the company Cotelec owned by Le Pen’s father received a €2 million loan from an obscure Cypriot offshore company, Vernonsia Holdings Ltd.

While the owner’s identity was never made clear, the French online ­investigative journal Mediapart revealed that it was financed by Russian funds and had ties to Yuri Kudimov, a former KGB agent who headed the Russian state bank VTB and who is close to influential ­oligarch ­Konstantin Malofeev.

According to Le Monde the RN ­indirectly benefited from this loan, as it borrowed money from Cotelec to help ­underwrite the costs of Marine’s 2017 presidential campaign.

Also back in 2014, Le Pen’s party ­directly secured a loan from a Russian bank, the First Czech Russian Bank (FCRB), to bankroll its campaign for the 2015 regional and departmental elections.

A 2019 study by the Washington-based Alliance for Securing Democracy at the German Marshall Fund found that the FCRB bank had been a “a key cog in ­Moscow’s attempt to swing political ­contests overseas – and how this bank sought to use existing campaign finance loopholes to achieve political objectives”.

Le Pen’s anti-immigration party was a focus of the study, saying the bank had been involved in being a “vehicle for ­money-laundering by corrupt elites on a massive scale.” It also cited ­“Russian state-sanctioned interference in the ­Western political system” in the form of the loan to Le Pen’s party.

Only last Wednesday, as France’s ­presidential campaign moved into its ­final throes, the activist team supporting imprisoned Russian opposition leader Alexei Navalny stepped abruptly into the tight election contest using social media to urge voters to back Macron and ­alleging that Le Pen is too closely linked to Russia.

NAVALNY, who is Putin’s chief domestic foe, communicating through a long Twitter thread in French, said that he wanted to tell Le Pen’s supporters about corruption in Russia and how it has tainted banks like the FCRB.

“This bank is a well-known money-laundering agency created at the ­instigation of Putin,” Navalny tweeted, although he did not cite any evidence other than his own investigations into corruption in ­Russia. “This is selling political influence to ­Putin,” the Associated Press cited him as writing.

In an unusual appeal that reflected the force of his belief, but some say might ­itself be construed as interference, ­Navalny said: “Without any hesitation, I call on the French to vote for Emmanuel Macron.”

The timing of the Navalny message could not have come at a worse time for Le Pen coinciding as it did just hours ­before her last critical televised debate with ­Macron, who used it to tear into his rival arguing that the loan Le Pen ­received from the FCRB made her ­unsuitable to deal with Moscow.

“You are speaking to your banker when you speak of Russia, that’s the problem,” Macron charged. “You cannot correctly defend France’s interests on this ­subject because your interests are linked to ­people close to Russian power.

“You depend on Russian power, and you depend on Mr Putin,” Macron ­insisted, while Le Pen bristled at the suggestion and replied that she was “totally free”.

As today’s vote gets underway the ­consensus remains that this is an election fought primarily on the key issue of the rising cost of living, the same pressure percolating its way through the politics of most countries in Europe.

Faced with the economic fallout from the pandemic and high energy prices, French voters like many elsewhere in ­Europe are feeling the pinch. For her part, Le Pen has sought to appeal to voters struggling with surging food and energy bills and promised to bring down the cost of living.

She is aided in this by the fact that ­Macron hasn’t been able to shake the ­perception among swathes of the ­electorate that he is elitist and out of touch. Many in France still contend that he rules the country for the benefit of the wealthy.

Even in his electoral strongholds many find him hard to warm to. As one ­observer noted these past few days there is a familiar adage about the presidential election – that in the final run-off, people vote for the candidate they dislike least. And that’s often Macron.

But despite all these other factors ­shaping the election outcome it would be wrong to underestimate the impact of the war in Ukraine on French voters who are often perceived as self-absorbed.

The battlefields of Mariupol might be a long way from the boulevards of Paris, but the war in Ukraine has hurt Macron’s most formidable opponents, not least Le Pen.

FOR many voters she is simply too close to Putin while Macron, though not exactly liked, is someone many believe they can trust in a crisis when it comes to foreign policy and helping keep Russia in check.

Perhaps another way of looking at it is that if the war in Ukraine has according to some been Boris Johnson’s get out of jail card over partygate, then it’s served Macron well in slipping the threat posed by Le Pen’s election campaign.

It’s a measure of the extent to which Le Pen herself realises the damage done to her election chances that these past days she has sought to pivot on her position ­towards Russia.

“Until the triggering of the war in Ukraine, I actually believed that it was in the interest of France to have closer ties with Russia again, and … prevent Russia from building such a solid alliance with China,” Le Pen said.

Just last Wednesday as the election race drew to its finish Le Pen insisted that she also shared Macron’s desire to “tie up Russia to Europe again”, when he invited Putin to the Versailles Palace in 2017 and to his summer residence in Bregançon two years later.

Politico magazine also cited her as ­adding that she is in favour of closer NATO-Russia ties “once the war between Russia and Ukraine is over and resolved with a peace treaty”.

But few have bought into her change of face towards Moscow and the damage is already done from what many see as her political alignment and pandering to ­Putin.

If there is uncertainty over the outcome of today’s election then it stems from the risk of low voter turnout, as leftist voters refuse to give their vote to Macron, even at the risk of handing over to Le Pen.

Polls have also forecast a possibly ­record-high number of people who either vote blank or stay at home and don’t vote at all in this final round.

If Macron wins, it does not mean all is well for France or the EU, as he will still preside over a fractured, discontented country where many citizens loath him.

But re-election would be a feat for the 44-year-old Macron, given that ­under the Fifth Republic the French have never ­re-elected an incumbent president ­holding a majority in parliament.

READ MORE: French election 2022: Marine Le Pen gets Tory voters' backing in UK, poll finds

Certainly, having him back in power will come as a relief to many European leaders – and those in ­Washington – right now deeply concerned about ­Russia’s war in Ukraine. That much was ­apparent from the ­recent barely disguised ­appeal to French voters by the leaders of ­Germany, Spain and Portugal made in a joint ­column ­published in the French ­newspaper Le Monde favouring Macron and rejecting Le Pen.

Pulling no punches Olaf Scholz, Pedro Sanchez and Antonio Costa criticised Le Pen as someone sympathetic to Putin who would undermine the EU.

“For us, the second round of the French presidential election is not an election like any other,” they wrote. “It’s the choice between a democratic ­candidate who ­believes that France is stronger in a powerful and autonomous EU, and an extreme-right candidate who openly lines up with those who are attacking our ­liberty and our democracy.”

Today France will make its own choice, but one can’t help feeling that Marine Le Pen’s cosiness with the Kremlin has been her election undoing.