Twitter has reportedly barred US intelligence agencies from accessing a service that lets them delve through every tweet on the network in real-time.

A third-party service run by a firm called Dataminr sends out alerts of unfolding terror attacks, political unrest, and other potentially important world news events.

Twitter has a 5% stake in Dataminr, which is the only company with access to Twitter’s entire real-time stream of public tweets.

But a report in the Wall Street Journal says that Dataminr executives have told intelligence agencies that Twitter does not want the firm to continue providing data to them.

A police officers sets a security perimeter near Maalbeek metro station in Brussels.

Dataminr says it beat the media in flagging up the Brussels attacks

Some have speculated that Twitter may not want to be seen as too close to American intelligence services, in light of Apple’s recent battle with the FBI.

Twitter said that much of its information is available freely to anyone using the network, with a spokesman saying: “Data is largely public and the US government may review public accounts on its own, like any user could.”

Key clients of Dataminr include news media organisations, as well as banks and other financial institutions.

The Dataminr software spots patterns in hundreds of millions of daily tweets, matching them with market information and geographic information to flag credible information.

It flagged up the Paris terror attacks just minutes after they began to unfold, and claims it beat the news media to discovering the Brussels attacks by 10 minutes.

Former deputy director of the US National Security Agency, John C Inglis, told the Journal: “If Twitter continues to sell this (data) to the private sector, but denies the government, that’s hypocritical.

“I think it’s a bad sign of a lack of appropriate cooperation between a private-sector organisation and the government.”