Germany will strip ISIS fighters of their citizenship, after the government agreed on a new anti-terror law, local media reports.

The new law will apply to adult German nationals with dual citizenship, who take part in future battles for any terrorist 'militia'.

This means it will not apply to foreign ISIS fighters who have fled its territories in recent weeks or are already imprisoned.

A woman looks on as she waits to be searched by members of the Kurdish-led Syrian Democratic Forces (SDF) after fleeing ISIS's last holdout in Syria

The expanded Nationality Act would see citizenship stripped of anyone who 'takes part in combat operations abroad for a terrorist militia,' in order to 'establish a new state or state structures,' Deutsche Welle reports.

The fall of ISIS in Syria and the increasingly publicised desires by foreign fighters to return to their home countries have seen several Western nations take action against homegrown jihadists.

The UK stripped 19-year-old Shamima Begum, who left east London's Bethnal Green to join ISIS aged 15, of her British citizenship after she was tracked down by a Times journalist in the Al Hol refugee camp and spoke of her desire to return to her home country.

Last week, Sweden moved to make it illegal to join a terror organisation as the government seeks to punish 'returning' jihadist fighters.

Men and boys suspected of being Islamic State (IS) group fighters wait to be searched by members of the Kurdish-led Syrian Democratic Forces (SDF) after leaving ISIS' last holdout of Baghouz, in the eastern Syrian Deir Ezzor province on Friday

The new law, set to enter into force in August, 'will allow us to prosecute and try many more of them than we've been able to until now,' Justice Minister Morgan Johansson said.

However, the legislation will not be retroactive and therefore cannot be applied to the dozens of fighters who have already come back to Sweden.

Under the current laws, Sweden can only prosecute foreign fighters if it can prove that they have been involved in crimes violating the Geneva Convention.

This comes after the Kurdish government suggested that if foreign fighters could not return, then international tribunals similar to the ones used to convict Nazis after the Second World War could be set up to deal with the problem.