Yahoo Inc was among the companies targeted by recent Chinese cyber attacks and had conversations with Google Inc about the attacks prior to Google's announcement this week, according to a person familiar with the matter.

Google said on Tuesday that a sophisticated attack originating in China resulted in the theft of intellectual property from Google and that at least 20 other large companies had been similarly targeted.

Google said the primary goal of the attacks was to access Gmail accounts of human rights activists and that the company was notifying other affected companies.

Shortly after Google's announcement, Adobe Systems Inc said it had been a target of a similar attack.

Media reports earlier this week suggested Yahoo had also been a victim, but until now it had not been clear if Yahoo had actually been apprised of the attacks by Google.

Google publicized the incidents on Tuesday in posts on its official blog.

Yahoo absolutely was one of the affected companies, said the person familiar with the matter, who asked not to be named.

He said conversations had taken place between the companies before Google published its blog posts.

Analysts have said many companies choose not to publicize cyber attacks out of fear of exposing their own technological vulnerabilities and, in this case, of upsetting business relations with China.

If you're being hurt and I'm not being hurt, I don't take risks with my company just to help you, said Clyde Prestowitz, president of the Washington-based Economic Strategy Institute.

It is unclear whether the attacks on Yahoo were successful and if any company or user data was taken by the hackers.

A Yahoo spokeswoman did not return calls for comment.

Earlier this week, the company issued a statement saying Yahoo does not generally disclose information about attacks on its systems, but the company takes security very seriously and takes appropriate action in the event of any kind of breach.

The company also said in a separate statement that it stood aligned with Google that these kinds of attacks are deeply disturbing and strongly believe that the violation of user privacy is something that we as Internet pioneers must all oppose.

Google said it would not comment on specific companies involved.

(Reporting by Alexei Oreskovic; additional reporting by Gabriel Madway; editing by Andre Grenon)