Apple's iCloud storage and backup service in China was attacked by hackers trying to steal user credentials, a Chinese web monitoring group said, adding that it believes the country's government is behind the campaign.
Using what is called a "man-in-the-middle" (MITM) attack, the hackers interposed their own website between users and Apple's iCloud server, intercepting data and potentially gaining access to passwords, iMessages, photos and contacts, Greatfire.org wrote in its blog post.
Greatfire.org, a group that conducts research on Chinese Internet censorship, alleged government involvement in the attack, saying it resembled previous attacks on Google, Yahoo, and Microsoft's Hotmail. (Disclosure: CNBC has a content-sharing partnership with Yahoo's finance site.)
Asked about the attack, Hua Chunying, a spokeswoman for China's Foreign Ministry, told a daily news briefing that Beijing was "resolutely opposed" to hacking. She said the Chinese government itself was a major victim of such attacks.
The attack cited by Greatfire comes several weeks after Apple said it would begin storing iCloud data for Chinese users on China Telecom servers.
It also coincided with the start of iPhone 6 sales in China, which began Friday after weeks of talks between China and Apple over what the government said were cybersecurity concerns.
Read MoreThe ugly number in Apple's earnings
Two independent security experts contacted by Reuters said Greatfire's report appeared credible.
"All the evidence I've seen would support that this is a real attack," said Mikko Hypponnen, chief research officer at security software developer F-Secure. "The Chinese government is directly attacking Chinese users of Apple's products."
Greatfire.org said the attack most likely could not have been staged without the knowledge of Internet providers like China Telecom, given they appeared to originate from "deep within the Chinese domestic Internet backbone".
But the group said the attack may not be linked to Apple's recent decision to store user data on China Telecom servers.
"The previous MITM attacks all showed the same characteristics as this one," Greatfire.org co-founder Charlie Smith said by email. "Apple did not need to be doing anything with China Telecom for this attack to happen, i.e. the authorities did not need that relationship to stage an attack like this one."
It was unclear if the hackers were still active. Apple did not have an immediate comment when contacted.
A China Telecom spokesman said: "The accusation is untrue and unfounded."
Apple said at the time the move to China Telecom was made to improve the speed of service for Chinese servers and flatly denied the possibility that it would expose user data.
The United States and Western companies have accused Chinese-backed hackers of infiltrating government and corporate websites and services, but Beijing has repeatedly denied its involvement in such attacks.