Mr Gates told Axios: “The tech companies have to be ... careful that they're not trying to think their view is more important than the government's view, or than the government being able to function in some key areas."

Asked for examples, Mr Gates reportedly noted tech companies’ “enthusiasm about making financial transactions anonymous and invisible, and their view that even a clear mass-murdering criminal's communication should never be available to the government".

The comments from one of the most famous names in technology will be welcomed by Conservatives seeking to make social media companies more accountable.

National governments are still struggling to create a legal framework for controlling how internet giants act after the internet communications revolution of the last decade.

Ms Rudd has spearheaded the UK’s efforts to make social media companies act more responsibly for damaging information posted on their sites.

She has challenged the companies' views that they are platforms – where information is posted by others – rather than publishers, who have more responsibility about what appears online.

Concern has focused not just on well-known internet firms such as Facebook, Twitter and Google but also smaller ones such as Telegram, Wordpress and Justpaste.it.

Ms Rudd visited tech firms in California and politicians in Washington, DC last year to get social media companies to make more information accessible to governments.

Adrian Ajao, the jihadist who drove down pedestrians on Westminster Bridge before storming Parliament in March 2017, sent a message on WhatsApp just two minutes before the attack.

Amber Rudd, the Home SecretaryCredit: REUTERS/Hannah Mckay

Days later Ms Rudd criticised WhatsApp and other social media companies for not doing more to hand over such messages to government officials.

“We need to make sure that organisations like WhatsApp, and there are plenty of others like that, don’t provide a secret place for terrorists to communicate with each other,” Ms Rudd said at the time.

“It used to be that people would steam-open envelopes or just listen in on phones when they wanted to find out what people were doing legally."

“But in this situation we need to make sure that our intelligence services have the ability to get into situations like encrypted WhatsApp.”

Internet companies argue that creating a "back door" into encrypted messages would make them vulnerable to computer hackers.

Mr Gates’s comments came as his charity, Bill & Melinda Gates Foundation, released its annual letter outlining their work and philanthropy.

Mr Gates told Axios: "The [tech] companies need to be careful that they're not ... advocating things that would prevent government from being able to, under appropriate review, perform the type of functions that we've come to count on."