Calling 2016 a year full of "severe tests", Germany's Chancellor Angela Merkel said that Islamic terrorism was by far the most difficult one – what with the country witnessing a string of terror attacks in Würzburg, Ansbach and most recently, Berlin.

In her New Year speech to the nation, Merkel urged citizens not to turn to populism but fight "hatred" with "humanity" and "unity". "We are stronger when we are united. Our country is stronger," she said.

Making direct reference to the terror attack in Berlin before Christmas Day, which is believed to have been carried out by the 24-year-old refugee Anis Amri, she said that these acts "make a mockery" of Germany's willingness to help.

Merkel said that it was "a bitter reckoning - and a despicable one" that these attacks were carried out by individuals "who came here ostensibly to seek safe haven and then received help and support".

She, however, continued to defend her open-door refugee policy, saying that Germany made the right move by allowing those in need to seek asylum in the country. "With the images of the bombed in Aleppo in Syria, one may say once again how important and right it was that our country in the past year allowed those who actually need our help to be here with us, to take a step and to integrate," she said in the speech. "All this — it is reflected in our democracy, in our state, in our values."

German Chancellor Angela Merkel poses for photographs after the television recording of her annual New Year's speech at the Chancellery in Berlin REUTERS/Markus Schreiber/Pool

The chancellor pointed out that the government would also take stronger measures to ensure the safety of its citizens. "In the coming year, if necessary, the German government will quickly introduce and enact additional legal and policy measures," she said.

In her speech, Merkel addressed criticism of the EU and its future in the wake of the UK's Brexit vote. "Yes, Europe is slow. It is painful. It has deep incisions like the withdrawal of a member state. And, yes, Europe should focus on what it can really do better than the nation state," she said. "[But] where Europe — in global competition, in protecting our external borders or migration — faces issues together, it must find answers together. No matter how arduous and tough that is."

Germany is expected to hold federal elections in September 2017, and while she ranks high in the polls, the year's attacks and immigration debate have drawn support away from her Christian Democratic Party (CDU) to the Alternative for Germany party (AfD) which is anti-immigration.