Germany is set to launch tougher security measures for asylum seekers and refugees who are not properly documented or deemed to pose a security threat.

The new measures, agreed upon on Tuesday, will make it easier for the authorities to electronically tag immigrants considered a security risk, as well as those required to leave Germany but who have not yet left, and to deport them.

Germany's interior and justice ministers, representing the two blocs in Chancellor Angela Merkel's ruling coalition, agreed on increasing surveillance of suspicious immigrants following the Christmas market attack in Berlin in which a failed Tunisian asylum seeker killed 12 people.

READ MORE: The rise of Germany's anti-refugee right

"We have agreed on the introduction of mandatory residency: in layman's terms, stricter domicile requirements for asylum seekers who have been deceptive with their identities," Thomas de Maiziere, Germany's interior minister, said.

"Secondly, it will now be easier to take people into custody for deportation."

Earlier on Tuesday, Joachim Herrmann, the Bavarian interior minister, said Italy and Greece should if necessary be excluded from Europe's passport-free Schengen area if they do not fulfil their obligations to exchange data on criminals.

Germany's refugees campaign against restrictions

He said people travelling by air or over land should be checked at the borders of those countries if they did not comply.

He called for an end-of-year deadline to be set.

German investigators identified the Berlin market attacker as a threat last February, but when officials subsequently met to discuss whether to deport him they determined he posed no acute threat that could be presented in court, the Sueddeutsche Zeitung reported last week.

The Christmas market attack has thrown security policy into sharp focus in the lead-up to September's federal elections.

In addition to the tougher rules for failed asylum seekers, de Maiziere has proposed restructuring Germany's security set-up.

In recent years Germany took in more than one million refugees and asylum seekers, but an increasing number of them have voluntarily left following more immigration controls and anti-immigration sentiment in the country.