The UK government has announced it will appoint media watchdog Ofcom as an online regulator that will have power to hold social media companies to account for harmful content, such as violence or child abuse.

Facebook, Twitter, Instagram, Snapchat and other platforms involving user-generated content will need to remove illegal content and take measures to reduce the possibility of it appearing online.

Digital secretary Nicky Morgan said the measures will be introduced based on a white paper launched in April, that calls for fines, site blocks and the prosecution of senior management for firms that fail to protect their users.

“With Ofcom at the helm of a proportionate and strong regulatory regime, we have an incredible opportunity to lead the world in building a thriving digital economy, driven by groundbreaking technology, that is trusted by and protects everyone in the UK”, Morgan said.

Home secretary Priti Patel added: “We will give the regulator the powers it needs to lead the fight for an internet that remains vibrant and open but with the protections, accountability and transparency people deserve”.