By Stacy Meichtry and Anton Troianovski

When French presidential candidate Emmanuel Macron met with German Chancellor Angela Merkel last month, the conversation turned to a question bedeviling Europe's political establishment. How could they halt the rising tide of nationalism across the Continent?

Mr. Macron, who is fighting right-wing euroskeptic Marine Le Pen for the lead in Sunday's election for France's top office, had an answer. He said the European Union needed more integration, not less.

For years, mainstream leaders, faced with a rising populist movement, relied on a strategy of containment. That involved ignoring its rhetoric, dismissing demands to dismantle the EU as a recipe for turmoil, and at times mimicking its language. The limits of that approach have been laid bare by Britain's decision to leave the EU, Ms. Le Pen's rise in France, and recently the surge of a euroskeptic French candidate on the far left, Jean-Luc Mélanchon.

With elections in France this weekend and in Germany later this year, pro-EU forces are adopting a new approach: a full-throated defense of the economic bloc and its place in their countries' future.

The shift is embodied by Mr. Macron, who has defined himself in opposition to Ms. Le Pen, figuratively wrapping himself in the blue and gold-starred EU flag she would remove from government buildings.

"Our fight for fraternity will be our fight for Europe," Mr. Macron told a February rally in Lyon organized across town from where Ms. Le Pen was declaring her candidacy. "Europe! Europe!" the crowd of thousands chanted.

Where Ms. Le Pen wants to reinforce France's national borders, Mr. Macron says the solution to its terrorism fears is to bolster the frontiers of the EU. She wants a more independent defense policy for France; he wants tighter military coordination across the bloc.

And where Ms. Le Pen sees the euro as the root of France's economic woes, Mr. Macron touts the EU's single market as the key to French prosperity.

Supporters of Ms. Le Pen say Mr. Macron is playing into her hands by squaring off on the future of Europe. Ms. Le Pen has spent years spoiling for that fight.

"This is Marine Le Pen's issue. By attacking her on it, he's going to get slapped," said Raphael Ricci, a gendarme from the Champagne-region city of Reims.

Mr. Macron's love of the EU isn't unconditional. He says serious changes are needed if the bloc is to mount an enduring electoral defense against euroskeptics.

One of his more controversial proposals is that the strongest of the 19 countries using the euro should help shoulder fiscal burdens of the weaker ones. That stance puts him at odds with Ms. Merkel and some other pro-EU leaders, especially in northern Europe.

The election in France will be the first major test of whether a political strategy of direct confrontation with anti-EU forces works.

A poll the EU conducted of its member countries in November shows the share of EU citizens with a positive image of the bloc has declined to 35% from about 50% 10 years ago, with one-quarter now viewing it negatively. The EU's image has recovered somewhat from a low point in 2011-2013.

In the poll, 37% of Germans saw the EU positively -- an 8-percentage-point jump from last spring -- while in France 29% saw the EU positively, a 7-percentage-point decline.

In Dutch elections last month, two parties firmly supporting European integration more than doubled their share from a 2012 vote, and anti-Islam nativist Geert Wilders lost his bid to become prime minister.

The latest polling for the French election shows four contenders clustering near the top. Mr. Macron has vaulted ahead of candidates from France's traditional parties to pull even with Ms. Le Pen for the lead. It is difficult to pinpoint how much of his support is due to his European-unity stance and how much is primarily opposition to the far right and far left. If Mr. Macron and Ms. Le Pen make it to a decisive second round, the polls indicate he would come out ahead.

In Germany, which votes for chancellor in September, Martin Schulz, a staunchly pro-EU candidate, has energized centrist voters and knocked the wind out of the populist right. The anti-immigrant, anti-euro Alternative for Germany has fallen sharply in the polls since late January as Mr. Schulz has climbed, although the four-year-old AfD is still polling well above the 5% support it would need to enter the federal parliament for thefirst time.

Pro-EU candidates are increasingly looking across borders as they seek to energize their electorates. The goal is to create a groundswell of electoral support that might one day allow France and Germany to agree on steps to improve the bloc's functioning.

"Dear friends in France," Mr. Schulz said, suddenly switching to French at a recent gathering of center-left politicians. "We are sending you today, from Berlin, a sign of our unshakable solidarity. Together, we will defeat the enemies of tolerance and cooperation."

Mr. Macron has met with Mr. Schulz, the nominee of Germany's Social Democrats, as well as with Ms. Merkel, pushing the idea that the EU needs to deepen its integration so it can function more like a sovereign state.

"I cannot accept leaving the idea of sovereignty to the far-right or the far-left populists," Mr. Macron told an auditorium of German dignitaries while visiting Berlin in January. Hespoke in English, drawing a barb from Ms. Le Pen, who said he should have used French.

The pro-Europe forces have their own ideological divisions to bridge, a north-south split deepened by fallout from the 2008 financial crisis, terror attacks and waves of migrants from Africa and the Middle East.

The north and south are split over how to repair what many economists regard as the Achilles' heel of the eurozone: its inability to deal with the debt burdens of weaker members such as Greece. German-imposed austerity has damaged fragile economies, many economists say, but loosening fiscal rules could put northern European taxpayers on the hook for what many of them see as the profligacy of the south.

Southern EU countries, for their part, blame the north both for imposing austerity on them and for leaving peripheral countries to fend for themselves in enforcing border controls to stem the migrant flood.

France, facing securityand economic challenges, has retreated from its traditional role as a bridge over the north-south divide. President François Hollande flouted eurozone budget-deficit rules and bucked the EU's call to deeply overhaul rigid French labor rules. His government has refused to accept large numbers of refugees.

After Islamic State's attacks in Paris on Nov. 13, 2015, Mr. Hollande proposed amending the constitution so some French nationals convicted of terrorism could be stripped of citizenship. The proposal scrambled French politics, with parts of his majority joining the opposition to block it.

Mr. Macron, who was then the economy minister, began charting a different course. He declared his "philosophical unease" with taking away citizenship, a proposal that looked to critics like borrowing from Ms. Le Pen's National Front playbook. Unhappy, too, that his proposals to loosen labor rules were shelved by Mr. Hollande, Mr. Macron founded hisown movement, called En Marche, or On the Move, and quit the government.

Like Mr. Hollande, Ms. Merkel came under pressure last year to move rightward, in her case to compete with the anti-immigrant AfD following two attacks by Islamist migrants. At the time, it looked as if fending off the AfD would be her biggest task in her 2017 bid for re-election. The Social Democrats' surprise nomination of Mr. Schulz in January changed the equation.

The Social Democrats this year have added more than 16,000 new members, or nearly 4% of the total, and more than the additions in all of last year. The main reason people give for joining is to defend the EU and fight the far right, a party spokesman said.

At Mr. Schulz's raucous rallies -- by modern German standards -- he has given those new members red meat, assailing the AfD as well as U.S. President Donald Trump. In a speech last month, Schulz called the AfD "a disgrace to Germany" and accused Mr. Trump of "laying an ax to the roots of democracy" through his treatment of the news media.

While Ms. Merkel also supports a strong EU, Mr. Schulz makes the case with what critics say the chancellor often lacks: emotion. His rise to close to her in the polling provides a further disincentive for the chancellor to move rightward in the coming campaign, because doing so would increase her risk of losing centrist voters.

In France, Mr. Macron's camp reached out to Ms. Merkel in February to request a meeting. The French politician, just 39 years old and never having won elective office, was under pressure to show he could go toe-to-toe with world leaders, and landing an audience with the German chancellor was a boon for him. In taking the meeting, Ms. Merkel departed from her decision in France's 2012 election to meet only with then-President Nicolas Sarkozy, who was seeking re-election, and not with Mr. Hollande.

Mr. Macron needed to navigate some policy differences with her, however. He had just delivered a speech complaining that the euro unduly benefits German trade and hurts some other EU countries' trade.

The idea, often heard in southern Europe, is that Germany's exports would suffer if it still used a strong deutsche mark. Instead, its exports have benefited from sharing a weaker currency with 18 other countries.

"The dysfunctioning of the euro is good news for Germany, I have to say. You benefit from this dysfunctioning," he told a crowd at Humboldt University of Berlin. German officials counter that economic weakness in the eurozone, the country's biggest export market, is bad for Germany, too.

(MORE TO FOLLOW) Dow Jones Newswires

April 19, 2017 12:58 ET (16:58 GMT)

Copyright (c) 2017 Dow Jones & Company, Inc.