US security used software to scan the social media profiles of visitor to the country – but it worked so badly a report concludes it is more reliable to check accounts manually.

A study by the Department of Homeland Security (DHS) inspector this week revealed that in December 2015, US Citizenship and Immigration Services (USCIS) ran a pilot scheme monitoring the social media accounts of visitors both manually and automatically.

The computer programmes used were not named in the heavily redacted report, but the tests were repeated in April and August 2016 using different software.

“In reviewing the pilot, USCIS concluded that the tool was not a viable option for automated social media screening and that manual review was more effective at identifying accounts,” the report states.

The report based its conclusion on “low match confidence” because the resulting accounts identified by the software did not always match up with the applicants’ profiles.

The conclusion that the old-fashioned methods may be the best could prove difficult for the department, however, as a huge army of workers would be required to monitor the accounts of the millions of foreign nationals who visit the country each year, with statistics showing 77.5 million visitors in 2015.

The DHS has said it will cost around £300 million to collect the social media data they want, but if software is not reliable, the true costs could be significantly higher.

The DHS Office of Intelligence and Analysis acknowledged the report's conclusions and said it would add metrics to determining if they are successful or not.

It said that at the moment, neither the government nor the private sector “possessed the capabilities for large-scale social media screening.

Under President Barack Obama, the government began asking some people to voluntarily submit social media profiles, but President Donald Trump wants to press ahead with “extreme vetting” methods in order to try and prevent possible terrorists from entering, meaning account monitoring is likely to become mandatory and more invasive.

The new boss of the US Department of Homeland Security, John Kelly, has said that such checks should be mandatory and visitors should expect to have to provide passwords and banking records.

A consortium of civil liberties groups, including the ACLU and Reporters without Borders, sent Mr Kelly an open letter condemning the plans to demand such personal data. They point out that if the US introduces such a policy, other countries will most likely follow suit, putting American data at risk.

“We urge you to reject any proposal to require anyone to provide log-in information to their online accounts as a condition of entry into the United States,” it reads.