Hanover (Germany) (AFP) - US President Barack Obama made an impassioned plea for European unity in the face of rising populism and scepticism Monday, warning this was a "defining moment" for the continent.

"A strong and united Europe is a necessity for the world," Obama said in the German city of Hanover, in a landmark speech that carried the tone of a blunt challenge to friends.

Visiting a region reeling from a migration crisis, economic stagnation and facing the prospect of Britain abandoning the European Union, Obama warned that "progress is not inevitable".

Contrasting the prosperity of Europe today with the wars and hardship of the last century, Obama called on Europeans reject the "us-versus-them" politics that has fuelled the rise of the far right in countries from Poland to France.

"Perhaps you need an outsider, somebody who is not European, to remind you of the magnitude of what you have achieved," he said, a day after the anti-immigration far-right triumphed in a presidential vote in Austria.

- Don't turn inward -

Hours before he and Chancellor Angela Merkel were to hold talks with the leaders of Britain, France and Italy, Obama painted today's Europeans as heirs to the popular movements that ended the Cold War.

And he also recalled the devastating consequences of "intolerance and extreme nationalism" that drenched Europe in blood during the 20th century.

"In the last century, just twice in 30 years, the forces of empire and intolerance and extreme nationalism consumed this continent and cities like this one were largely reduced to rubble," Obama said.

"Tens of millions of men and women and children were killed."

While admitting there could be frustrations with European institutions, he argued that "turning inward" was not the answer to Europe's problems.

As rightwing populism gains ground in parts of the continent in response to growing Islamic radicalism, he urged Europe to remain open.

"I want you to remember that our countries are stronger, they're more secure and more successful when we integrate people of all backgrounds and faiths, and make them feel as one. And that includes our fellow citizens who are Muslim," he said.

Story continues

On a visit to Britain ahead of his arrival in Germany, the US president had also waded into an increasingly-bitter debate over the UK's membership in the European Union, urging Britons to vote against leaving the bloc in a June referendum.

For much of Obama's seven years in the White House his relationship with Europe has been uneasy.

Obama began his presidency with Europeans revelling in Washington's more relaxed approach to foreign policy than under his predecessor George W. Bush.

- Pushing forward US-EU trade -

But since then, Obama's star has dimmed, and the US president has become frustrated with Europe's inability to move quickly in response to the global recession or to the threat from jihadists.

In a mark of that frustration, Obama bluntly told his audience that Europe needs to do more to shoulder the collective security burden.

"Europe has sometimes been complacent about its own defence," Obama said, repeating a long-standing call for NATO allies to increase defence spending to at least two percent of economic output.

More than half a century after the end of World War II, much of the continent, including economic power Germany, remains firmly under the umbrella of security provided by the United States.

Obama stressed not only the need for European nations to work together, but to work with Washington to tackle a host of challenges, from Syria and Iraq to global trade and climate change.

And he said he would send up to 250 more special forces military trainers to Syria to help rebels fighting Islamic State jihadists.

His remarks came as Europe scrambles to try and limit the refugee flow into the bloc and the bloodshed in Syria.

As he arrived in Germany on Sunday, Obama made a strong pitch for US-EU trade.

"Angela and I agree that the United States and the European Union need to keep moving forward with the Transatlantic Trade and Investment Partnership negotiations," said Obama of the vast EU-US trade agreement in the making which has run into strong public opposition.

He called for the agreement to be sealed before the end of the year, even though tens of thousands marched through Hanover on the eve of his visit to protest against the treaty amid fears it would erode protection for workers and consumers.

Both Obama and Merkel say the pact will provide a shot in the arm to Western economies.