By Michelle Martin and Joseph Nasr

BERLIN (Reuters) - The European Union is in danger of breaking apart unless France and Germany, in particular, work harder to stimulate growth and employment and heed citizens' concerns, French Prime Minister Manuel Valls said in the German capital on Thursday.

Valls said the two countries, for decades the axis around which the EU revolved, had to help refocus the bloc to tackle an immigration crisis, a lack of solidarity between member states, Britain's looming exit, and terrorism.

"Europe is in danger of falling apart," Valls said at an event organized by the Sueddeutsche Zeitung newspaper. "So Germany and France have a huge responsibility."

He said France must continue to open up its economy, not least by cutting corporate taxation, while Germany and the EU as a whole must increase investment that would stimulate growth and job creation, as well as boosting defense.

As Britain seeks to negotiate its post-Brexit relationship with the EU, hoping to restrict immigration from the EU while maintaining as much access as possible to the EU single market, Valls said it must be prevented from cherry-picking.

"If they are able to have all the advantages of Europe without the inconveniences, then we are opening a window for others to leave the European Union," Valls said.

Immigration was one of the main drivers of Britons' vote to leave the EU, and Valls said the bloc, which more than a million migrants entered last year, had to regain control of its borders.

He said the Brexit vote and Donald Trump's election victory showed how important it was to listen to angry citizens, and that politicians scared of making decisions were opening the door to populists and demagogues.

In France, opinion polls suggest that the far-right, anti-EU, anti-immigration National Front leader Marine Le Pen will win the first round of the presidential election next April, before losing the runoff.

But Valls said Trump's victory had boosted the chance of an outright Le Pen victory: "What has changed in the world and Europe since Nov. 8 is that it's possible."

He said France's election debate was "ignoring the danger posed by the far-right", adding: "We face a historic moment ... perilous for the world, perilous for Europe and perilous for France."

(Reporting by Andreas Rinke, Michelle Martin, Joseph Nasr and Gernot Heller; Editing by Kevin Liffey)