Angela Merkel delivers her speech at the European parliament in Strasbourg.
Photograph: Elyxandro Cegarra/Zuma Wire/Rex/Shutterstock

Angela Merkel has said EU leaders should one day consider “a real, true European army” shortly after Donald Trump ramped up a Twitter attack on Emmanuel Macron over the same idea.

Speaking to the European parliament in Strasbourg, the German chancellor backed the bold step in European defence policy, as part of a speech extolling the need for EU cooperation in migration, climate change and counter-terrorism. “The times when we could rely on others is past,” she said.

To a mix of applause and jeers from Eurosceptic MEPs, she said: “We have to look at the vision of one day creating a real, true European army.” The chancellor said the idea would complement Nato, but gave no details on when the ambitious idea could become reality.

Her words echoed those of the French president, who in an interview said Europe needed to better defend itself.

Nigel Farage, leader of the Eurosceptic group in the parliament, seized on Merkel’s remarks, claiming they showed the EU wanted to become an empire, while accusing the bloc of starting a cold war with the US. “I think Brexit becomes a necessity after this,” he said.

Merkel had earlier brushed aside heckling from Eurosceptic MEPs with a smile, saying the opposition showed she was in a parliament. “This is great, I am annoying some people,” she said.

During her 25-minute speech, the chancellor mentioned Brexit only once, describing it as a “deep wound”. She was echoed by the European commission president, Jean-Claude Juncker, who said Brexit was “a tragedy, a historical error [and] a mistake”.

Merkel was the 12th EU leader to address MEPs, as part of a series on the future of Europe, with six more scheduled before the European elections.

The theme of the speech was a call for solidarity, whether in defence, migration policy or for the EU to find a single voice on foreign policy. “Solidarity always means that we have to overcome national egoism,” she said, adding that it had taken Germany “far too long” to realise that refugee policy was a European issue.

Solidarity also required a commitment to the rule of law, she said, a coded reference to member states, such as Poland and Hungary, that stand accused by the EU institutions of backsliding on democratic values.

She was speaking shortly after Romania was given an unusually strong rebuke by the commission for “backtracking” on the fight against corruption and the creation of fully independent judiciary.

One of the EU’s newest member states, Romania has been on the EU’s critical list, since new laws changing the judiciary and abolishing some anti-corruption offences were introduced last winter, sparking mass street protests.

Romania, which will take over the EU’s rotating presidency from 1 January, was told to suspend a justice law that has been criticised by independent observers for violating judicial independence. Brussels also called on the Romanian government to re-start the process to appoint an independent anti-corruption prosecutor, after the previous one, was sacked.