The Trump administration is considering “extreme vetting” in which social media passwords and mobile phone contacts must be handed over when entering the US.

Travellers from many US allies, such as the UK, Ireland, Germany and France, may soon undergo “extreme vetting” when arriving in the US.

Visitors could be forced to reveal social media usernames and passwords, as well as financial data to US Customs and Border Protection officers. If the traveller refuses to hand over the information, they will likely be refused entry into the country.

Mobile phone contacts may also be analysed as well as any electronic or digital devices carried by the passenger. A senior department of homeland security official was quoted as saying that the aim is to “figure out who you are communicating with.”

Detailed ideological questions may be asked by border officials – for example, ‘what do you think of ISIS?’

The new policy is likely to affect the 38 countries that participate in the visa waiver program – a program that allows citizens of specific countries to travel to the US for tourism, business, or while in transit for up to 90 days without having to obtain a visa.

John Kelly, US Homeland Security Secretary, previously shared the idea of asking for passwords in February 2017. Speaking to the congressional Homeland Security Committee, he said: “We want to say for instance, ‘What sites do you visit? And give us your passwords,’ so that we can see what they do on the internet. If they don’t want to give us that information then they don’t come.”

The Electronic Frontier Foundation, a US nonprofit, campaigning for digital civil rights, said that although border agents cannot deny a US citizen admission to their own country, a foreign visitor has little to no legal protection and may simply be denied entry to the US.