Google announced today it will open a lab in Beijing dedicated to researching artificial intelligence (AI).

The news comes as China’s government and tech companies race ahead to dominate the field, putting Google in a position where it has no choice but to set up locally in order to remain at the cutting edge.

According to the search giant, the lab will be led by a small team of researchers and supported by Google engineers already working in China on developing the company’s global-facing products. It will be helmed by Jia Li, head of research and development at Google Cloud AI, and Fei-fei Li, director of the Stanford Artificial Intelligence Lab and a chief scientist at Google Cloud AI.

In a blog post announcing the move, Li notes that the company is currently hiring for positions at the lab—something media outlets picked up on a few months ago. Searching through Google’s job-posting page for Beijing yields recruitment ads for technical leads and software engineers specializing in machine learning. A company spokesperson says the lab will focus on general-purpose research in the field, rather than product development.

“I believe AI and its benefits have no borders. Whether a breakthrough occurs in Silicon Valley, Beijing or anywhere else, it has the potential to make everyone’s life better for the entire world,” Li wrote in the blog post. “As an AI first company, this is an important part of our collective mission. And we want to work with the best AI talent, wherever that talent is, to achieve it.

Increasingly, much of that talent is located in China. Tech giants Alibaba, Tencent, and Baidu have each plowed resources into various AI fields, including facial recognition, voice assistants, and automation. Smaller startups, like Sensetime, Megvii, and ByteDance, have approached or surpassed billion-dollar valuations thanks to funding from larger Chinese companies, the government, or overseas tech giants. In July, Beijing launched a directive called the “Next Generation Artificial Intelligence Development Plan,” which outlines a policy plan to turn China into a “primary innovation center” for AI by 2030.

In academia, meanwhile, China has a presence in AI research that’s impossible to ignore. According to Sinovation Ventures AI Institute, a research arm of a venture capital group led by former Google China head Kai-fu Lee, more than half of the citations in the top 100 AI journals and conferences go to ethnic Chinese.

Despite having virtually no consumer-facing presence stateside, Tencent, Baidu, and ride-hailing giant Didi Chuxing each have labs located in the US, where staff of all nationalities conduct AI research. By opening a lab in Beijing, Google is merely following this trend in reverse, chasing the talent where it lies.

Yet Google’s relationship with China has been mired by politics. The company unceremoniously shut down its mainland China-facing search engine in 2010 after refusing to comply with censorship demands. The government has never forgiven it for that. Many of the company’s other consumer-facing products, like Gmail, have steadily been blocked, and its efforts to launch an app store in China have stalled. Beijing has also snubbed Google in a few public settings. At this month’s World Internet Conference in Wuzhen, China, Google CEO Sundar Pichai’s panel played to a half-empty room due to an unusual scheduling snafu.

It’s not clear how, if at all, Beijing’s ambivalence toward Google will affect the company’s AI efforts there. On the one hand, it will only boost China’s global reputation as an AI leader, and will presumably contribute more to the domestic talent pool. On the other, Beijing would likely rather see China’s best and brightest AI researchers work for Tencent or Alibaba rather than a US-based competitor. For Google though, wrestling with these issues is probably secondary to ensuring it can do AI research in China to begin with.