Google said Wednesday a hacker in China obtained access to hundreds of Gmail accounts, including those of senior U.S. government officials, military personnel, Chinese political activists and journalists.

The company said it recently detected the security breach and stopped what it described as “a campaign to take users’ passwords and monitor their emails, with the perpetrators apparently using stolen passwords to change peoples’ forwarding and delegating settings.”

Google’s email service enables users to forward messages automatically and grant others access to their accounts.

In a blog post, Google said it has notified victims of the attack. It has also notified relevant government authorities, the company said. Other world leaders affected include government officials from South Korea, Google said.

A spokesman declined to comment on who the victims were and how long the hacker had access to their Gmail accounts.

The episode comes amid a flurry of cyber attacks in recent weeks, including one hacker’s access to Sony’s online video game accounts. Rep. Anthony Weiner (D-N.Y.) this week said he was a “victim of a prank,” referring to what he has called a hacker’s access to his Twitter account and a tweet to a woman in Seattle with a picture of a groin.

It didn’t immediately appear that the incidents were connected.

Google said in its post that its affected Gmail users were victims of a “phishing” scheme. That tactic allows hackers to obtain user names and passwords by asking for the information under the guise of providing security for online accounts.

“It’s important to stress that our internal systems have not been affected—these account hijackings were not the result of a security problem with Gmail itself,” Google said in the blog. “But we believe that being open about these security issues helps users better protect their information online.”