Google has drawn up detailed plans for the closure of its Chinese search engine and is now “99.9 per cent” certain to go ahead as talks over censorship with the Chinese authorities have reached an apparent impasse, according to a person familiar with the company’s thinking. 
 
 In a hardening of positions on both sides, the Chinese government also on Friday threw down a direct public challenge to the US search company, with a warning that it was not prepared to compromise on internet censorship to stop Google leaving. 
 
 The signs that Google was on the brink of closing Google.cn, its local search service in China, came two months after it promised to stop bowing to censorship there. But while a decision could be made very soon, the company is likely to take some time to follow through with the plan as it seeks an orderly closure and takes steps to protect local employees from retaliation by the authorities, the person familiar with its position said. 
 
 Google is also seeking ways to keep its other operations in China going, although some executives fear that a backlash from the Chinese authorities could make it almost impossible to keep a presence in the country. 
 
 When the search giant first promised to end censorship in response to what it claimed were a series of cyber-attacks mounted from inside China, many China-watchers warned that its public defiance of Beijing would provoke a stern response. 
 
 On Friday, Li Yizhong, minister for industry and information technology, said: “If [Google] takes steps that violate Chinese laws, that would be unfriendly, that would be irresponsible, and they would have to bear the consequences.” 
 
 One person close to the search company, meanwhile, said that its senior executives remained “adamant” about ending the censorship. The company has also ruled out keeping the search service going by handing majority control, or even the entire business, to a local player, this person said. 
 
 Google’s executives have made it clear that they still hope to stay in the country, whatever the fate of Google.cn. “It’s very important to know we are not pulling out of China,” Eric Schmidt, Google’s chief executive, told the Financial Times at the time. “We have a good business in China. This is about the censorship rules, not anything else.” 
 
 The company’s other operations, which pre-date the launch of Google.cn four years ago, include its research centre in Beijing and a sales force that sells advertising on the Chinese-language Google.com search service, based outside China, to advertisers inside the country. 
 
 Mr Li encouraged Google to continue its operations in the country. “[Google] has taken 30 per cent of the Chinese search market. 
 
 “If you don’t leave, China will welcome that, if you don’t leave, it will be beneficial for the development of the internet in China.” ||||| Google is reportedly planning to get back into China, a lucrative market where it has a long history of tangling with authorities. 
 
 The Intercept reported Wednesday that Google plans to launch a search app in China that would block sensitive websites and search terms to comply with Chinese government censorship. 
 
 China has hundreds of millions of internet users and a thriving online shopping market, making it impossible for US tech companies to ignore. But jumping back into China presents ethical issues for Google (GOOGL), which has long advocated a free and open internet. 
 
 Andy Tian, a tech executive who formerly led mobile strategy and partnerships for Google in China, said the Chinese tech companies that currently dominate search can't compete with Google's product. 
 
 "There's a huge void, Google can fill that void," said Tian, who is now CEO of Asia Innovations. 
 
 Asked about The Intercept report, Google said in a statement that "we don't comment on speculation about future plans." 
 
 Related: Google's latest move to crack China: A WeChat game 
 
 Like many other US internet platforms, Google's most popular products — search, YouTube, Gmail — have been banned in China for years, blacked out by a vast government censorship apparatus known as the Great Firewall. 
 
 But that wasn't always the case. 
 
 Google China 1.0 
 
 Google launched a Chinese language version of its search engine — google.cn — in 2006. It complied with Beijing's censorship laws. 
 
 "While removing search results is inconsistent with Google's mission, providing no information (or a heavily degraded user experience that amounts to no information) is more inconsistent with our mission," Google said at the time. 
 
 Related: Google to censor itself in China 
 
 While the search engine was censored, it also flagged to users when information was removed from results. That gave Chinese internet users an idea of what they were not allowed to see. 
 
 "We reminded users in China every single day that they are looking at filtered results," said Tian, who worked at Google when the search engine launched. 
 
 Still, critics complained that Google was breaching its own company motto: "Don't Be Evil." 
 
 The company's devotion to web freedom, critics charged, was being subverted by a willingness to comply with Chinese censorship in return for access to a huge potential customer base. 
 
 Attack and retreat 
 
 Google was battling Baidu (BIDU) for market share. Three years after launch, Google had wrestled about a third of the search market away from its Chinese rival. 
 
 The dynamic changed in January 2010, when Google charged that Chinese hackers had targeted Google and more than 20 other Western companies and compromised the email accounts of Chinese dissidents living abroad. 
 
 Beijing denied that it had been involved in the attacks, but the incident sparked a political fight with Washington. 
 
 Related: Google quits censoring search in China 
 
 About three months later, Google made good on a threat to stop offering search in China. 
 
 In March 2010, it announced it had stopped running the censored Google.cn service and began routing its Chinese users to an uncensored version of Google based in Hong Kong. 
 
 Academics, university students and other researchers relied heavily on Google's search services to access information not available through Chinese search engines like Baidu. 
 
 Businesses that depended on Google applications such as Google Docs and Gmail also suffered. 
 
 Google wants back behind the Firewall 
 
 Google's parent company Alphabet changed its motto in 2015, replacing "Don't Be Evil" with "Do the Right Thing." 
 
 From a business perspective, getting back into China is the right thing for Google. It currently offers just a few services in the country — Google Translate, a file organizing program and a new AI game. 
 
 Advertising is Google's main source of revenue, and 1.4 billion potential users are hard to ignore. Facebook (FB), which competes with Google for advertising revenue, is also locked out of China. 
 
 Shares in Baidu (BIDU) dropped 8% on Wednesday after The Intercept report was published. 
 
 Related: Google bets $550M on Chinese e-commerce firm JD.com 
 
 Critics and human rights groups are already accusing Google of bending to China's will. 
 
 "The reality is that they will be serving the Chinese government," said Lokman Tsui, former head of free expression for Google in Asia. 
 
 "The government now tracks people, apps on phones reveal who you are, where you are. They are intrusive," he added. "They collect much more data and Google can be requested to handover these data to the government." 
 
 — Begona Blanco Munoz contributed reporting.
– Having lost its showdown with the Chinese government, Google is poised to close its Chinese search site, rather than continue to censor results. The company will likely take action within weeks, a source familiar with the situation tells the Wall Street Journal. When it does, China will prevent local news sites from using anything but official accounts of the move. Another source tells the Financial Times that it is “99.9%” certain that Google will pull out. On Friday a Chinese official warned that if Google stopped censoring results, “that would be unfriendly, that would be irresponsible, and they would have to bear the consequences.” Google is hoping to keep some of its other Chinese operations running. “We are not pulling out of China,” Eric Schmidt said recently. “This is about the censorship rules, not anything else.” But some executives fear the backlash from closing Google.cn will make that impossible.