Sydney: Australia on Thursday passed a law criminalising travel to terror hot spots, a tough counter-terrorism measure aimed at stopping jihadists from going to Iraq and Syria to fight.

The Australian government has been increasingly concerned about the flow of foreign fighters to the Middle East to join militant groups such as Daesh (The Islamic State of Syria and the Levant), with 70 Australians believed to have already made the journey.

The Counter-Terrorism Legislation Amendment (Foreign Fighters) includes measures that make it an offence to enter a “declared area” where a terrorist organisation is engaging in hostile activity, without a valid reason.

The offence carries a maximum penalty of 10 years in prison.

“The foreign fighters bill that has passed the parliament today will mean, first of all, that it is easier to secure convictions against Australians who have been fighting with terrorist groups overseas,” Prime Minister Tony Abbott told parliament.

“It will mean that it is easier to monitor potential terrorists here, and it will also mean ... that it is easier to prosecute the preachers of hate who create the potential terrorists.”

Abbott said about 100 Australians were supporting jihadists who had travelled to the Middle East to fight with recruitment and funding from home.

Some 20 jihadists who fought with terrorist groups in the region had also returned to Australia, Abbott added.

“The best way to deal with returning foreign fighters is to stop them leaving in the first place ... and I’m able to inform the House that some 70 Australian passports have been cancelled to stop terrorists or potential terrorists from travelling.”

The new law came into force as the government introduced a bill Thursday that requires Australian telecommunication firms to retain customers’ digital data for two years.

Communications Minister Malcolm Turnbull said the laws were “absolutely critical” for law enforcement and intelligence agencies, while stressing that the metadata collected “does not include the content of communications”.

“What it is seeking to do simply is to ensure that the ability of our law enforcement agencies, security agencies and police are not diminished because changing technologies and changing business practices no longer require telcos to retain that type of data,” he said.

But the Australian Lawyers Alliance said the data retention bill was a “recipe for privacy abuse” and would leave Australians with “no protection against security agencies misusing their personal or private information”.

“Under the legislation, every single phone call, every single text message, email or online communication will available to be accessed by security agencies such as ASIO (Australian Security Intelligence Organisation) or the Australian Federal Police,” alliance spokesman Greg Barns said in a statement.

Concerns about another national security measure passed in September as part of an anti-terror crackdown were also raised by the Labor opposition amid fears that journalists could be jailed for up to 10 years if they reported on certain intelligence operations.

Attorney-General George Brandis refuted the concerns, saying that the legislation was instead “intended to deal with a Snowden-type situation”.

Documents leaked by US intelligence fugitive Edward Snowden included reports in November that Australian spies tried to tap the phones of former Indonesian President Susilo Bambang Yudhoyono and his inner circle, damaging relations between the two countries.