Facebook CEO and co-founder Mark Zuckerberg wrote in a public note Wednesday that Facebook has decided not to build data centers in countries that have been violating human rights, including privacy and freedom of expression.

Zuckerberg seems to be referring to China, where the social media site is banned and where Facebook has long been working to expand business.

China has strict regulations in storing data in the country, and Apple has already built a data center that complies with these regulations.

Facebook has previously built its first data center in Asia in Singapore, where the government restricts freedom of press and speech.

Mark Zuckerberg's vow to overhaul Facebook with new privacy rules is likely to spell the end of its years-long campaign to enter China.

Facebook's CEO said in a blog post on Wednesday that the social network will not build data centers in countries that have a record of violating privacy and freedom of expression.

That moral stance would likely make it impossible for Facebook to offer its service in China, where recent data localization laws require that internet service providers keep all personal data produced by its citizens — from emails to selfies — on computers within the country's borders.

"As we build our infrastructure around the world, we've chosen not to build data centers in countries that have a track record of violating human rights like privacy or freedom of expression," Zuckerberg wrote. Facebook decided not to build data centers in those countries because it can make it easier for governments to access people's sensitive data, he said.

To many observers, the implication was obvious.

"In other news, Zuck has clearly given up on entering China, as these changes makes that impossible. Good," Alex Stamos, adjunct professor at Stanford and Facebook's former chief security officer, tweeted after Zuckerberg published his comments.

A senior source inside Facebook told Buzzfeed News on Wednesday that the company "does not see a path forward in China" and has given up efforts to enter the world's largest internet market by users.

Read more: China has withdrawn approval for Facebook's new venture in the country, where it remains banned

Facebook's service is currently blocked in China, but the company has long said that entering the market is crucial to its mission of connecting the world. As Facebook's growth slows, China's 800 million internet users represent an attractive untapped market for Facebook, which generates almost all of its revenue by showing ads to users.

Facebook is not following in Apple's footsteps

Facebook had previously confirmed that it had at least four data sharing partnerships with Chinese companies, including smartphone company Huawei, which is under scrutiny from the U.S. government. Facebook had said it would end those partnerships.

Facebook would almost certainly have run into compliance issues if it built a data center in China.

Chinese President Xi Jinping, left, talks with Facebook Chief Executive Mark Zuckerberg Ted S. Warren-Pool/Getty Images For example, data that's collected in China must be stored in that country, and companies must comply with strict rules like undergoing a security assessment if they want to send or move the data outside of China. China also requires companies to assist authorities when they conduct security investigations.

Apple already has a data center in China to host the local version of its iCloud online services. It complies with Chinese regulations and is operated by a Chinese company, raising concerns among privacy advocates that the Chinese government will be able to more easily access this data.

Facebook may see its stance on China as an opportunity to claim a moral high ground in an escalating war of words with tech rival Apple over consumer privacy.

"People want to know their data is stored securely in places they trust," Zuckerberg wrote. "Looking at the future of the internet and privacy, I believe one of the most important decisions we'll make is where we'll build data centers and store people's sensitive data."

That said, Facebook has already built a data center in Singapore — the company's first in Asia. Compared to China, Singapore has a more relaxed stance on data storage, but Singapore's government has also put restrictions on freedom of speech and press.

How Facebook justifies its presence in some countries versus others, already a thorny issue freighted with politics, is likely to become even more controversial under the company's new policy.

Facebook declined to comment beyond the blog post.