HONG KONG — Sören Schwertfeger finished his postdoctorate research on autonomous robots in Germany, and seemed set to go to Europe or the United States, where artificial intelligence was pioneered and established.

Instead, he went to China.

“You couldn’t have started a lab like mine elsewhere,” Mr. Schwertfeger said.

The balance of power in technology is shifting. China, which for years watched enviously as the West invented the software and the chips powering today’s digital age, has become a major player in artificial intelligence, what some think may be the most important technology of the future. Experts widely believe China is only a step behind the United States.

China’s ambitions mingle the most far-out sci-fi ideas with the needs of an authoritarian state: Philip K. Dick meets George Orwell. There are plans to use it to predict crimes, lend money, track people on the country’s ubiquitous closed-circuit cameras, alleviate traffic jams, create self-guided missiles and censor the internet.

Beijing is backing its artificial intelligence push with vast sums of money. Having already spent billions on research programs, China is readying a new multibillion-dollar initiative to fund moonshot projects, start-ups and academic research, all with the aim of growing China’s A.I. capabilities, according to two professors who consulted with the government on the plan.

China’s private companies are pushing deeply into the field as well, though the line between government and private in China sometimes blurs. Baidu — often called the Google of China and a pioneer in artificial-intelligence-related fields, like speech recognition — this year opened a joint company-government laboratory partly run by academics who once worked on research into Chinese military robots.

China is spending more just as the United States cuts back. This past week, the Trump administration released a proposed budget that would slash funding for a variety of government agencies that have traditionally backed artificial intelligence research.

“It’s a race in the new generation of computing,” said James Lewis, a senior fellow at the Center for Strategic and International Studies. “The difference is that China seems to think it’s a race and America doesn’t.”

For Mr. Schwertfeger, the money mattered. He received a grant six times larger than what he might have gotten in Europe or America. That enabled him to set up a full artificial intelligence lab, with an assistant, a technician and a group of Ph.D. students.

“It’s almost impossible for assistant professors to get this much money,” he said. “The research funding is shrinking in the U.S. and Europe. But it is definitely expanding in China.”

Mr. Schwertfeger’s lab, which is part of ShanghaiTech University, works on ways for machines, without any aid from humans, to avoid obstacles. Decked out with wheeled robots, drones and sensors, the lab works on ways for computers to make their own maps and to improve the performance of robots with tasks like finding objects — specifically, people — during search-and-rescue operations.

Much of China’s artificial intelligence push is similarly peaceful. Still, its prowess and dedication have set off alarms within the United States’ defense establishment. The Defense Department found that Chinese money has been pouring into American artificial intelligence companies — some of the same ones it had been looking to for future weapons systems.

Quantifying China’s spending push is difficult, because authorities there disclose little. But experts say it looks to be considerable. Numerous provinces and cities are spending billions on developing robotics, and a part of that funding is likely to go to artificial intelligence research. For example, the relatively unknown city of Xiangtan, in China’s Hunan province, has pledged $2 billion toward developing robots and artificial intelligence. Other places have direct incentives for the A.I. industry. In Suzhou, leading artificial intelligence companies can get about $800,000 in subsidies for setting up shop locally, while Shenzhen, in southern China, is offering $1 million to support any A.I. project established there.

On a national level, China is working on a system to predict events like terrorist attacks or labor strikes based on possible precursors like labor strife. A paper funded by the National Natural Science Foundation of China showed how facial recognition software can be simplified so that it can be more easily integrated with cameras across the country.

China is preparing a concerted nationwide push, according to the two professors who advised on the effort but declined to be identified, because the effort has not yet been made public. While the size wasn’t clear, they said, it would most likely result in billions of dollars in spending.

President Trump’s proposed budget, meanwhile, would reduce the National Science Foundation’s spending on so-called intelligent systems by 10 percent, to about $175 million. Research and development in other areas would also be cut, though the proposed budget does call for more spending on defense research and some supercomputing. The cuts would essentially shift more research and development to private American companies like Google and Facebook.

“The previous administration was preparing for a future with artificial intelligence,” said Subbarao Kambhampati, president of the Association for the Advancement of Artificial intelligence. “They were talking about increasing basic research for artificial intelligence. Instead of increases, we are now being significantly affected.”

China’s money won’t necessarily translate into dominance. The government’s top-down approach, closed-mouth bureaucracy and hoarding of information can hobble research. It threw a tremendous amount of resources toward curing severe acute respiratory syndrome, the deadly virus known as SARS, when it swept through the country 15 years ago. Yet the virus was eventually sequenced and tamed by a small Canadian lab, said Clay Shirky, a professor at N.Y.U. Shanghai and a technology writer.

“It wasn’t that anyone was trying to stop the development of a SARS vaccine,” Mr. Shirkey said. “It’s the habit that yes is more risky than no.”

Authorities in China are now bringing top-down attention to fixing the problem of too much top-down control. While that may not sound promising, Wang Shengjin, a professor of electronic engineering at China’s Tsinghua University, said he had noticed some improvement, such as professional groups sharing information, and authorities who are rolling back limits on professors claiming ownership of their discoveries for commercial purposes.

“The lack of open sources and sharing of information, this has been the reality,” Mr. Wang said. “But it has started to change.”

At the moment, cooperation and exchanges in artificial intelligence between the United States and China are largely open, at least from the American side. Chinese and American scholars widely publish their findings in journals accessible to all, and researchers from China are major players in America’s research institutions.

Chinese tech giants like Baidu, Tencent and Didi Chuxing have opened artificial intelligence labs in America, as have some Chinese start-ups. Over the past six years, Chinese investors helped finance 51 American artificial intelligence companies, contributing to the $700 million raised, according to the recent Pentagon report.

It’s unclear how long the cooperation will continue. The Pentagon report urged more controls. And while there are government and private pushes out of China, it is difficult to tell which is which, as Baidu shows.

Baidu is a leader in China’s artificial intelligence efforts. It is working on driverless cars. It has turned an app that started as a visual dictionary — take a picture of an object, and your cellphone will tell you what it is — into a site that uses facial recognition to find missing people, a major problem in a country where child kidnapping has been persistent. In one stunning example, it helped a family find a child kidnapped 27 years earlier. DNA testing confirmed the family connection.

Baidu’s speech-recognition software — which can accomplish the difficult task of hearing tonal differences in Chinese dialects — is considered top of the class. When Microsoft announced last October that its speech recognition software had surpassed human-level language recognition, Baidu’s head of research at the time playfully reminded the American company that his team had accomplished a similar feat a year earlier.

In an apparent effort to harness Baidu’s breakthroughs, China said this year that it would open a lab that would cooperate with the company on A.I. research. The facility will be headed by two professors with long experience working for government programs designed to catch up to and replace foreign technology. Both professors also worked on a program called the Tsinghua Mobile Robot, according to multiple academic papers published on the topic. Research behind the robot, which in one award is described as a “military-use intelligent ground robot,” was sponsored by funding to improve Chinese military capabilities.

Li Wei, a professor involved in the Baidu cooperative effort, spent much of his career at Beihang University, one of China’s seven schools of national defense.

A company spokeswoman said: “Baidu develops products and services that improve people’s lives. Through its partnership with the A.I. research community, Baidu aims to make a complicated world simpler through technology.”

Still, there are advantages in China’s developing cutting-edge A.I. on its own. National efforts are aided by access to enormous amounts of data held by Chinese companies and universities, the large number of Chinese engineers being trained on either side of the Pacific and from government backing, said Mr. Wang, of Tsinghua.

Driving that attention is a breakthrough from an American company largely banned in China: Google. In March 2016, a Google artificial intelligence system, AlphaGo, beat a South Korean player at the complicated strategy game Go, which originated in China. This past week, AlphaGo beat the best player in the world, a Chinese national, at a tournament in Wuzhen, China.

The Google event changed the tenor of government discussions about funding, according to several Chinese professors.

“After AlphaGo came out and had such a big impact on the industry,” said Zha Hongbin, a professor of machine learning at Peking University, “the content of government discussions got much wider and more concrete.” Shortly afterward, the government created a new project on brain-inspired computing, he added.

For all the government support, advances in the field could ultimately backfire, Mr. Shirky said. Artificial intelligence may help China better censor the internet, a task that often blocks Chinese researchers from finding vital information. At the same time, better A.I. could make it easier for Chinese readers to translate articles and other information.

“The fact is,” Mr. Shirky said, “unlike automobile engineering, artificial intelligence will lead to surprises. That will make the world considerably less predictable, and that’s never been Beijing’s favorite characteristic.”