Big technology companies face a crackdown over extremist content unless they take action to police themselves better by the end of the year, the former head of GCHQ has indicated.
Robert Hannigan, who was director of Britain's electronic surveillance agency between 2014-2017, said that international information platforms were behaving more responsibly than in the past, but are only beginning to get the message.
Mr Hannigan told BBC 5 Live: "I was very critical of them back in 2014 when I thought they were being very obstructive, around counter terrorism especially, and the stuff we were trying to do.
"They have got much better to be fair, and I think they are trying. They are beginning to get the message, but I've always thought there's a kind of window for them to reform themselves, and show they're serious and they get the message.
"The window is closing I think. Otherwise governments around the world will start legislating.
"Some have already. The German government for example. I think that's a shame. I think it would be much better if the companies reformed themselves but I think they are probably missing the boat.
"I think it's reasonable to say that if they haven't really achieved something that is credible by the end of this year, then that window is going to close for them. "
Prime Minister Theresa May's official spokesman suggested that levies could be imposed if tech companies do not take action against extremist material.
"As we have said ourselves, progress has been made since the Prime Minister and other leaders requested much speedier action to remove extremist and terrorist material online.
"We have seen some movement in terms of taking material down automatically.
"But there is more still to be done and we reserve the right to take further steps if the companies don't achieve that."
Asked what sanctions companies could face if they fail to act, the PM's spokesman said: "In the past we have discussed the issue of levies as one possible option."
Mr Hannigan said he believed big tech companies are now more powerful than the world's governments.
And the former spy boss also expressed concern about Russia's cyber "aggression".