In its latest move to wean the country off its dependence on foreign technology, the Chinese government announced during the weekend it will launch its own operating system, or OS, for desktop, tablet and mobile phone platforms. The creation of the OS -- which is expected to debut in October -- follows a directive by the Ministry of Industry and Information Technology and involves Ni Guangnan, one of China's most famous software engineers.

The announcement has come during a trying time for American high-tech giants looking to gain a foothold in the world’s second-largest economy. In May, Beijing announced government computers will no longer be permitted to run Windows 8, the newest OS developed by Microsoft (NASDAQ:MSFT), due to security concerns. And earlier this month, the government banned use of public money in purchasing  a list of 10 products by Apple (NASDAQ:AAPL), including popular items such as MacBook Air laptops.

China has made its intention to compete with its top-ranked foreign competition explicit. “We’re creating an environment that allows us to contend with Google, Apple and Microsoft,” Ni told the state-run Xinhua news agency.

This weekend’s announcement does not in fact mark the first time China has invested in an operating system. Along with Japan and South Korea, the country announced plans to launch a pan-Asian system based on Linux in 2003, and last year the tech firm Canonical signed a deal with Beijing to create an OS based on its Ubuntu software. But the urgency of this latest effort -- Xinhua reported that the government wants foreign operating systems removed from desktop computers within two years -- reflects a heightened concern American technology companies are complicit in spying on China.

For China, the rationale is clear. But will the new OS be successful?

In recent years, China has created its own version of the global Internet, mirroring successful foreign brands with domestic alternatives. Facebook (NASDAQ:FB) has been banned in China since 2009, but Kaixinwang, a Chinese equivalent, remains highly popular. Twitter, too, is illegal, but Sina Weibo, a similar microblog service, has more than 500 million users. For Google there's Baidu (NASDAQ:BIDU), a Chinese search engine, and Xiaomi phones have eaten into a market share once dominated by Apple. These companies emerged as China ramped up censorship with the ostensible purpose of avoiding political destabilization.

But replacing a foreign operating system is different. An estimated 92 percent of desktop computers in China run on Windows, including 70 percent that run on Windows XP, an OS introduced in 2001 that Microsoft no longer supports. Eighty-five percent of the country’s smartphones, including Xiaomi, use Google's Android software. Charlie Custer, a China technology expert who writes for Games in Asia, said such market dominance will make it difficult for Chinese consumers to make the switch.

I could see the OS becoming mandatory for government use, but outside China there would be too many security concerns about it,” he said. “There would likely be compatibility issues with many foreign-developed pieces of software, because foreign developers would probably not bother to support the OS. That in turn means that even in China it wouldn't be popular, simply because it couldn't do as much as a foreign OS like Windows.”

For a Chinese government concerned with spying and foreign competition, this is a sacrifice that may be worth making.