Robert Verkaik is a freelance security correspondent specialising in Russian espionage and the war against terror. In 2016 he wrote "Jihadi John: The Making of a Terrorist", which traces Mohammed Emwazi's path from London schoolboy to ISIS executioner. Follow the author on Twitter. The views expressed in this commentary are his own.

(CNN) Donald Trump thinks that Angela Merkel's immigration policies have been a "catastrophic mistake" and has blamed the broader refugee crisis for Britain's decision to leave the EU.

In a joint interview for German newspaper Bild and the Times newspaper in London , the President-elect said: "I have great respect for her, I felt she was a great leader, I think she made one very catastrophic mistake and that was taking all these illegals and taking all these people where ever they come from and nobody really knows where they come from."

However, I believe that Germany's open-door refugee policy will, in the long run, help protect Germans from terrorism.

There is evidence that with the right immigration policy, refugees can play a valuable role in the war against terror.

Germany's decision is a ray of hope in a world of bleak humanitarian catastrophe. Rather than focus on the imagined links between terrorism and immigration, we should look at the long-term benefits of pursuing a plan that is helping to build stronger multi-cultural communities that can fight extremism.

Vital intelligence

In Germany, this policy is already delivering results with vital intelligence being passed by resident Muslims to the country's domestic security service, the BND.

There is also evidence around the case of the Berlin market investigation that community informants have played their part in warning about the threat posed by prime suspect Anis Amri before the attack. An informant tipped off security services when he attempted to buy a gun.

Intelligence from security agencies is almost always based on pointers gleaned from agents (not officers) working within the Muslim communities. Counter-terrorism operations tend to be intelligence-led but the security services never identify their sources.

JUST WATCHED Berlin attack suspect vowed loyalty to ISIS Replay More Videos ... MUST WATCH Berlin attack suspect vowed loyalty to ISIS 02:27

In the UK, 12 terror plots have been disrupted in the last three years. Electronic surveillance and human intelligence are the two sources of intelligence used in tandem in such investigations.

In October last year , two Syrians managed to capture a terror suspect in Leipzig who was planning a bomb attack on German airports. Jaber al-Bakr went on the run after evading a security cordon set up by the security services.

Other reports say he was only stopped when the Syrian refugees realized who he was and tricked him into meeting them in a flat and then tied him up before handing him over to the police.

'Immense success against terrorism'

Their actions prompted the Mayor of Leipzig, Burkhard Jung , to offer his heart-felt thanks, praising the Syrians' bravery. "This is an immense success against terrorism and shows that a large majority of the foreigners and asylum seekers who live here want nothing to with this form of radical Islamism," he said.

JUST WATCHED Refugees in Germany fear deportation Replay More Videos ... MUST WATCH Refugees in Germany fear deportation 04:09

These examples show that the German security services, in common with agencies across Europe, critically rely on intelligence passed on by members of its Muslim communities.

Ever since August 2015 when Germany opened its borders to refugees fleeing war zones across the Middle East, more than one million people have been offered sanctuary.

Merkel's message of peace

By showing compassion to hundreds of thousands of Muslim refugees, Merkel's message to the worldwide Islamic community is one of peace. Foreign policy that is perceived as anti-Muslim is recognized as a key radicalizing factor for violent extremists.

I believe Germany's humanitarian policy reduces the risk of her citizens being targeted by Middle East terror groups. The vast majority of Muslims now living in Germany should have every reason to cooperate with their own government in the fight against terrorism -- we can't win without them.

This is not something that can be said of the marginalized Muslim communities of the run-down suburbs of Brussels or Paris.

Today, Germany's Muslims feel threatened by resurgent far-right groups and are watching closely how Merkel's responds to demands to get tough with refugees.

Her decision to introduce laws to ban the burqa was widely criticized and if she is forced to row back on her immigration policy she risks losing the trust of the minority Muslim communities.

No country is immune to terror

The Berlin terror attack underlines the difficult task facing Europe's security services when trying to stop mass murder carried out by a determined terrorist, whether the perpetrator is an immigrant or European national. No country can immunize itself from all terrorism.

With the upcoming Germany election, 2017 will prove to be a critical year -- Merkel will come under increasing pressure to water down her open-door immigration policy to win re-election.