British citizens travelling to live in foreign terrorism hotspots could face up to 10 years in prison under controversial new laws.

The Counter-Terrorism and Border Security Act 2019 comes into force on Friday and creates a criminal offence of entering or remaining in a “designated area” overseas.

Ministers unveiled the measure last year as part of efforts to boost authorities’ ability to tackle the threat from so-called foreign fighters. The act allows the home secretary to designate an area, subject to parliamentary approval.

In order to use the power, Sajid Javid would need to be satisfied that it is necessary to restrict UK nationals and residents from travelling to or remaining in the area in order to protect the public from a risk of terrorism. An individual found to have entered or remained in a designated area could face up to 10 years in prison if convicted.

The act also gives border guards the power to stop and search individuals without suspicion on the grounds of tackling “hostile state” activity, and criminalises the viewing of terrorist-linked material online.

Exemptions have been written into the legislation to protect those who have a legitimate reason for being in a designated area or conducting research online, such as journalists. But campaigners for press freedom and human rights watchdogs have raised serious concerns about the legislation.

A joint statement from nine organisations including Index on Censorship and Reporters Without Borders last year warned the “vaguely defined” crime of hostile state activity would give border guards wide-ranging powers to stop, search and detain.

The signatories said a journalist taking a domestic flight could be stopped without any suspicion of wrongdoing and it would be an offence for the journalist not to answer questions or hand over materials, with no protection for confidential sources.

The cross-party joint committee on human rights said last year the legislation risked crossing the line on human rights and could restrict free speech and curb access to information.

More than 900 individuals “of national security concern” from the UK have travelled to take part in the conflict in Syria, the Home Office estimates. Of these, about 20% have been killed overseas and about 40% have returned to the UK.

Figures disclosed in the Commons last year suggested that only about 10% of returnees have been prosecuted over “direct action” in Syria, although the government says a significant proportion of those who have come back were assessed as no longer being of national security concern.

Javid said: “These new laws give the police the powers they need to disrupt terrorist plots earlier and ensure that those who seek to do us harm face just punishment. As we saw in the deadly attacks in London and Manchester in 2017, the threat from terrorism continues to evolve and so must our response, which is why these vital new measures have been introduced.”

Britain was hit by five attacks in 2017, while police and security services say they have foiled 18 plots in the last two years.