Google will warn users if it believes their email account is the target of
state-sponsored spying, in a move designed to protect activists, journalists
and political figures online.

Users of the web giant’s free Gmail email service have been attacked by hackers believed to be working for the Chinese government, although Beijing angrily denied involvement. Those targeted included democracy activists, the personal email accounts of American and South Korean officials and military personnel.

Now Google will warn such vulnerable users and encourage them to tighten their security settings.

“We are constantly on the lookout for malicious activity on our systems, in particular attempts by third parties to log into users’ accounts unauthorised,” said Eric Grosse, Google’s vice president of security engineering.

“When we have specific intelligence - either directly from users or from our own monitoring efforts - we show clear warning signs and put in place extra roadblocks to thwart these bad actors.”

A new red warning bar will appear at the top of threatened users’ Google accounts.

Google said it could not go into the details of how it knew some users could be the target of state spies because it could help the attackers. It said only that “detailed analysis” and “victim reports” strongly suggested “the involvement of states or groups that are state-sponsored”.

“We believe it is our duty to be proactive in notifying users about attacks or potential attacks so that they can take action to protect their information,” said Mr Grosse.

“And we will continue to update these notifications based on the latest information.”

The development prompted speculation that Google was working more closely with intelligence agencies such as the National Security Agency, America’s eavesdropping agency, which has growing cyber security responsibilities.

Christopher Soghoian, a US security and privacy expert, tweeted: “If the NSA, as part of its relationship with Google, shared foreign state attacker info, would Google reveal NSA was the source? Doubtful.”

Google has said that state-sponsored attacks on Gmail users were partly behind its 2010 decision to pull out of mainland China.

Hackers backed by Iran and Russia have also been accused of attempts to monitor Gmail accounts.