Microsoft will provide a customized version of Windows 10 to the Chinese government, the company announced on Thursday, as it continues to strengthen its relationship with Chinese regulators.
The partnership is a major turnaround for Microsoft’s ambitions in China. In 2014, regulators conducted an anti-monopoly investigation into the company over Windows’ dominance in the market, and even banned government purchases of computers running the operating system.
The custom Chinese version of Windows 10 will be “government-approved,” and will include Chinese-selected antivirus software. It will be distributed to Chinese government agencies and certain state-owned companies by C&M Information Technologies, a new Beijing-based venture created specifically for the partnership.
From Microsoft’s blog post:
The joint venture is not final, however. Microsoft says it is still subject to regulatory approval. The Chinese body participating in the joint venture is the China Electronics Technology Group. In September, Microsoft worked with CETG to make China’s top search engine, Baidu, the default homepage and search engine in its Edge browser in the region.
For Microsoft, the partnership not only secures the company a huge customer likely to spend hundreds of millions of dollars going forward, but also gives the company firm ground in a vast market where many of Microsoft’s most important vendors—such as Lenovo and Xiaomi—are based.
Microsoft says that “hundreds of millions” of PCs in China run Windows. However, one concern is that many of those copies are pirated. It’s very possible that Microsoft will look to work with Chinese regulators to try to crack down on software piracy.
In September, Microsoft (msft) CEO Satya Nadella met with Chinese president Xi Jinping to discuss concerns about intellectual property rights as well as how American tech firms can crack the huge market. Microsoft’s cloud server service, Azure, set up shop in China last year, partnering with Chinese company 21Vianet.
The Chinese government can also chalk up its partnership with Microsoft as a win. Recently, Chinese officials have been publicly concerned about big U.S. tech firms including secret backdoors in its software in light of Edward Snowden’s revelations about the National Security Agency’s spying programs.
China removed several U.S. tech firms from government-approved purchase lists earlier this year, and even started to develop its own alternative to Windows, called NeoKylin. The deal with Microsoft presumably will allow China to inspect its version of Windows 10 to ensure there are no hidden surprises that might compromise state security.
Recently, it was revealed that China supports state-owned companies seeking to develop a homegrown secure smartphone operating system.
For more on U.S. tech companies’ relationship with China, watch this Fortune video:
Subscribe to Data Sheet, Fortune’s daily newsletter on the business of technology.