Social media firms will be placed under a new statutory duty of care, and will be fined, prosecuted or could even be barred from operating in the UK if they fail to protect their users from online harms, The Daily Telegraph can reveal.

The Government will create a new independent regulator to enforce the duty of care with far-reaching powers to require firms to take down illegal or harmful material under new legally-binding codes.

Tech giants will have to take reasonable and proportionate action to protect children from harmful content. This ranges from illegal material such as sex abuse to potentially legal but harmful cyber-bullying, self harm, violence and porn.

Companies which commit the most serious breaches of the duty of care such as allowing terrorists or paedophiles to use their services will be hit with unprecedented enforcement action.

This will extend from multi-million pound fines to potential criminal prosecutions of named directors or even blocking overseas tech giants such as Facebook from access to UK users.