Former British spy chief Robert Hannigan has said Facebook could threaten democracy unless it is controlled.

Hannigan was previously chief of the UK's domestic intelligence agency, GCHQ.

He told the BBC that Facebook wasn't a "fluffy charity" and squeezes profit from users' data.

External regulation is required to curtail its power, he said.

The former head of Britain's domestic intelligence agency GCHQ has said Facebook poses a threat to democracy unless it is "controlled and regulated."

In an interview with the BBC's "Today" programme, Robert Hannigan said Facebook's primary goal was to squeeze every drop of profit from its users' data.

He said: "This isn't a kind of fluffy charity providing free services. It's is a very hard-headed international business and these big tech companies are essentially the world's biggest global advertisers, that's where they make their billions.

Read more: Internal emails show Mark Zuckerberg saying what's good for the world is not necessarily what's good for Facebook

"So in return for the service that you find useful they take your data... and squeeze every drop of profit out of it."

He added that Facebook was "potentially" a threat to democracy if "it isn't controlled and regulated."

"But these big companies, particularly where there are monopolies, can't frankly reform themselves. It will have to come from outside," he said.

Former GCHQ boss Robert Hannigan with the Queen. Reuters

Hannigan was head of GCHQ until January 2017. He has since been critical about Silicon Valley firms and their approach to tackling extremism on their networks.

The idea that Facebook is a threat to democracy is an emerging, troubling narrative for the social network, which generally tries to portray itself as a force for good and downplays its role as a powerful media platform.

Politicians have woken up to the concept that Facebook, with its population of more than 2 billion users, may be as powerful as governments, and that false information spread on its platform has the potential to sway elections or bring disaster. The UN said earlier this year that fake news spread on Facebook had a "determining role" in fuelling hatred against the persecuted Rohingya minority in Myanmar.

Molly Scott Cato, a European politician who helped fellow lawmakers grill Facebook CEO Mark Zuckerberg at a Brussels hearing in May, told Business Insider at the time: "He's totally out of his depth — he talks about setting Facebook up in college with this homey story and I'm, like, 'Christ, this guy has the fate of European democracy in his hands and he doesn't know what to do.'"

Hannigan's criticism was prompted by the release of a cache of internal Facebook documents by UK Parliament on Wednesday, which appeared to show the internal deliberations of Facebook around the value of user data, discussions about violating their privacy on Android, and squashing competitors. The documents are part of a legal case against Facebook brought by developer Six4Three in the US.

But Facebook said the documents are misleading without context. A spokesman said on Wednesday: "As we've said many times, the documents Six4Three gathered for their baseless case are only part of the story and are presented in a way that is very misleading without additional context."

You can read more about the cache of Facebook documents here.