The European Union has given Google, YouTube, Facebook, Twitter and other internet companies three months to show that they are removing extremist content more rapidly or face legislation forcing them to do so.

Social media firms have come under increasing pressure from various governments and the EU to do more to combat extremism and remove terrorist and objectionable content such as hate speech and Islamic State propaganda. But now the EU has given them a target and a deadline.

The European Commission said on Thursday that internet firms should be ready to remove extremist content within an hour of being notified and recommended measures they should take to stop its proliferation.

Digital commissioner Andrus Ansip said: “While several platforms have been removing more illegal content than ever before ... we still need to react faster against terrorist propaganda and other illegal content which is a serious threat to our citizens’ security, safety and fundamental rights.”

The recommendations, which are non-binding but could be taken into account by European courts, set guidelines on how companies should remove illegal content generally – from copyright infringements to hate speech – and advises a quicker reaction to extremist material.

The EC said that it would assess the need for legislation of technology firms within three months if demonstrable improvement is not made on what it describes as “terrorist content”, due to the urgency of the issue. European governments have said that extremist content on the web has influenced lone-wolf attackers who have killed people in several European cities after being radicalised.

For all other types of illegal content the EC will assess the technology firms’ progress within six months.

It also urged the predominantly US-dominated technology sector to adopt a more proactive approach, with automated systems to detect and remove illegal content, something Facebook and Google have been pushing as the most effective way of dealing with the issue.

However, the European Digital Rights group described the Commission’s approach as putting internet giants in charge of censoring Europe, saying that only legislation would ensure democratic scrutiny and judicial review.

The UK government recently unveiled its own AI-powered system for tackling the spread of extremist propaganda online, which it said would be offered to smaller firms that have seen an increase in terrorist use as they seek to avoid action by the biggest US firms.

“The EU is leading on the issue of reining in online abuses and the US and others should pay close attention and support the EU’s efforts with similar calls to action,” said Hany Farid, professor and chair of the Department of Computer Science at Dartmouth College.

