Presidential frontrunner was meeting with striking factory workers but far-right candidate rushed to her heartlands to try to show up rival

The French presidential frontrunner Emmanuel Macron was met with boos and jeers at a factory picket line in northern France after he was upstaged by a surprise appearance by his far-right rival, Marine Le Pen.

The political standoff amid the striking workers highlighted not only the plight of deindustrialisation in France but also the bitter public relations battle that is likely to rage in the final two weeks of the campaign.

Macron, an independent centrist who served as Socialist party’s economy minister under François Hollande, made a campaign trip to the factory in Amiens in the Somme on Wednesday in an attempt to reach out to blue-collar workers who have favoured the far-right Le Pen.

Macron, who has appealed to a well-educated and well-employed electorate, is under growing pressure to prove he has understood the plight of working-class voters struggling after decades of mass unemployment. Poorer voters in small towns, de-industrialised and rural areas who are pessimistic about their future have flocked to his rival Le Pen.

But Macron’s visit to the Whirlpool tumble dryer factory that is threatened with closure was a risky endeavour and quickly turned to farce, as Le Pen secretly rushed to the factory gates in her heartlands to try to outdo him.

Macron arrived in Amiens on Wednesday morning and sat down for talks with union representatives from the factory in the chamber of commerce building. But Le Pen suddenly appeared unannounced at the factory gates and posed with picketing workers live on rolling TV news channels.

She said: “Everyone knows what side Emmanuel Macron is on – he is on the side of the corporations. I am on the workers’ side, here in the car park, not in restaurants in Amiens.” She added: “He’s showing disdain for workers, so I’ve come to see them.”

Macron, visibly riled, accused her of only turning up for 10 minutes “because I am here” and said it was a mere photo opportunity. He then rushed to the factory gates himself, after Le Pen had gone, and waded into a group of workers. There were boos and jeers when he arrived, but he launched into a heated debate with them that his campaign team live-streamed on Facebook.

Shouting “listen to me” and waving his finger at the workers, he then passed round a microphone to let them speak. “I try to fix problems, not exploit them,” he said, making a dig at Le Pen. “Getting France back on its feet is going to take time and it will be difficult,” he added. He said he couldn’t keep the factory open – as Le Pen had promised – but vowed to fight for good terms for the closure.

Though Macron was born in Amiens, where he grew up in a bourgeois family and attended private school, this area along with swaths of the de-industrialised north and east voted for Le Pen in the first round of the presidential election last weekend.

Macron is trying to prove that his platform of pro-European, progressive, free-market, liberal values can also appeal to voters who are struggling economically. Le Pen has attacked him as the face of “rampant globalisation where money is king”.

In every French presidential election there is a strike at a closing factory that becomes symbolic of workers’ plight and deindustrialisation. The Whirlpool factory in Amiens has taken on that role this year. Production at the factory is due to stop and shift to a cheaper site in Poland next year.

Just as the last presidential election was marked by Hollande’s unkept promises to save the blast furnaces of a threatened steelworks in eastern France, the Whirlpool tumble dryers have become a talking point, particularly for Le Pen who has argued against globalisation and the EU.

Macron is well known for wading into crowds to try to personally convince his detractors. His supporters say it is a sign of his bravery but it has in the past led to arguments in front of the cameras. As economy minister he was accused of appearing haughty when, in front of cameras, he had an argument with a demonstrator in a T-shirt and told him “the best way to afford a suit is to work”.

One poll by Harris Interactive before the Amiens visit showed that 52% of French people felt Macron had botched the start of his second-round campaign before the final vote on 7 May. After winning the first round on Sunday with 24% to Le Pen’s 21%, he gave a triumphant speech and then celebrated at a Paris brasserie. He was criticised for taking victory for granted before the final vote was over.

Polls have long showed that any candidate who faced the far-right Le Pen would win the election because the mainstream right and left would join forces to keep Le Pen out.

The Socialist party boss Jean-Christophe Cambadélis told French radio: “[Macron] was smug. He wrongly thought that it was a done deal. It’s not a done deal.”