In public, President Vladimir Putin of Russia says his country’s growing friendship with China is unshakable — a strategic military and economic collaboration that has entered a golden era.

But in the corridors of Lubyanka, the headquarters of Russia’s domestic security agency, known as the FSB, a secretive intelligence unit refers to the Chinese as “the enemy.”

This unit, which has not previously been disclosed, has warned that China is a serious threat to Russian security. Its officers say that Beijing is increasingly trying to recruit Russian spies and get its hands on sensitive military technology, at times by luring disaffected Russian scientists.

The intelligence officers say that China is spying on the Russian military’s operations in Ukraine to learn about Western weapons and warfare. They fear that Chinese academics are laying the groundwork to make claims on Russian territory. And they have warned that Chinese intelligence agents are carrying out espionage in the Arctic using mining firms and university research centers as cover.

The threats are laid out in an eight-page internal FSB planning document, obtained by The New York Times, that sets priorities for fending off Chinese espionage. The document is undated, raising the possibility that it is a draft, though it appears from context to have been written in late 2023 or early 2024.

Ares Leaks, a cybercrime group, obtained the document but did not say how it did so. That makes definitive authentication impossible, but the Times shared the report with six Western intelligence agencies, all of which assessed it to be authentic. The document gives the most detailed behind-the-scenes view to date of Russian counterintelligence’s thinking about China. Since Russia invaded Ukraine in February 2022, Moscow’s new bond with Beijing has shifted the global balance of power. The rapidly expanding partnership is one of the most consequential, and opaque, relationships in modern geopolitics.

Russia has survived years of Western financial sanctions following the invasion, proving wrong the many politicians and experts who predicted the collapse of the country’s economy. That survival is in no small part due to China.

China is the largest customer for Russian oil and provides essential computer chips, software and military components. When Western companies fled Russia, Chinese brands stepped in to replace them. The two countries say they want to collaborate in a vast number of areas, including making movies and building a base on the moon.

Putin and Xi Jinping, China’s leader, are doggedly pursuing what they call a partnership with “no limits.” But the top-secret FSB memo shows there are, in fact, limits.

“You have the political leadership, and these guys are all for rapprochement with China,” said Andrei Soldatov, an expert on Russia’s intelligence services who lives in exile in Britain and who reviewed the document at the request of the Times. “You have the intelligence and security services, and they are very suspicious.”

Putin’s spokesperson, Dmitry Peskov, declined to comment. The Chinese Foreign Ministry did not respond to requests for comment on the document.

The Russian document describes a “tense and dynamically developing” intelligence battle in the shadows between the two outwardly friendly nations.

Three days before Putin invaded Ukraine in 2022, the FSB approved a new counterintelligence program called “Entente-4,” the document reveals. The code name, an apparent tongue-in-cheek reference to Moscow’s growing friendship with Beijing, belied the initiative’s real intent: to prevent Chinese spies from undermining Russian interests.

The timing almost certainly was not accidental. Russia was diverting nearly all of its military and spy resources to Ukraine, more than 4,000 miles from its border with China, and most likely worried that Beijing could try to capitalize on this distraction.

Since then, according to the document, the FSB observed China doing just that. Chinese intelligence agents stepped up efforts to recruit Russian officials, experts, journalists and businesspeople close to power in Moscow, the document says.

The possible long-term alignment of two authoritarian governments, with a combined population of nearly 1.6 billion people and armed with some 6,000 nuclear warheads, has stoked deep concern in Washington.

Some members of the Trump administration believe that, through outreach to Putin, Washington can begin to peel Russia away from China and avoid what Secretary of State Marco Rubio has called “two nuclear powers aligned against the United States.”

Putin has courted Xi for years, in more than 40 personal meetings, and has cemented a far deeper partnership with China since invading Ukraine. The two countries have a natural economic synergy, with Russia being one of the world’s largest energy producers and China the world’s largest energy consumer.

That poses a delicate challenge for Russian counterintelligence agents. The document shows them trying to contain the risks posed by Chinese intelligence without causing “negative consequences for bilateral relations.” Officers were warned to avoid any public “mention of the Chinese intelligence services as a potential enemy.”

China targets Russia’s war secrets, scientists

Soon after Russian troops pushed across the border into Ukraine, officials from Chinese defense firms and institutes tied to Chinese intelligence began flooding into Russia. Their goal, according to the FSB document, was to better understand the war.

China has world-class scientists, but its military has not fought a war since a monthlong conflict with Vietnam in 1979. The result is anxiety in China about how its military would perform against Western weapons in a conflict over Taiwan or the South China Sea. Chinese intelligence officials are eager to understand Russia’s fight against an army backed by the West.

“Of particular interest to Beijing is information about combat methods using drones, modernization of their software and methods for countering new types of Western weapons,” the FSB document says, adding that Beijing believes the war in Ukraine will become drawn-out. The conflict has revolutionized warfare technology and tactics.

The document also shows that Russia is very concerned about how China views the war in Ukraine and is trying to feed Beijing’s spies with positive information about Russian operations. And it commands Russian counterintelligence operatives to prepare a report for the Kremlin about any possible changes in Beijing’s policy.

Western leaders have accused China of providing Russia with essential weapons components and working to conceal it. The FSB document lends support to that claim, stating that Beijing had proposed establishing supply chains to Moscow that circumvent Western sanctions and had offered to participate in the production of drones and other unspecified high-tech military equipment. The document does not say whether those proposals were carried out, though China has supplied Russia with drones.

Moscow worries Beijing is trying to take land

Russia has long feared encroachment by China along their shared 2,615-mile border. And Chinese nationalists for years have taken issue with 19th-century treaties in which Russia annexed large portions of land, including modern-day Vladivostok.

That issue is now of key concern, with Russia weakened by the war and economic sanctions and less able than ever to push back against Beijing. The FSB report raises concerns that some academics in China have been promoting territorial claims against Russia.

China is searching for traces of “ancient Chinese peoples” in the Russian Far East, possibly to influence local opinion that is favorable to Chinese claims, the document says. In 2023, China published an official map that included historical Chinese names for cities and areas within Russia.

The FSB ordered officers to expose such “revanchist” activities, as well as attempts by China to use Russian scientists and archival funds for research aimed at attaching a historical affiliation to borderlands.

“Conduct preventative work with respect to Russian citizens involved in the said activities,” the memo orders. “Restrict entry into our country for foreigners as a measure of influence.”

China is unnerving Russia in Central Asia

The concerns about China expanding its reach are not limited to Russia’s Far East borderlands.

Central Asian countries answered to Moscow during the Soviet era. Today, the FSB reports, Beijing has developed a “new strategy” to promote Chinese soft power in the region.

China began rolling out that strategy in Uzbekistan, according to the document. The details of the strategy are not included in the document other than to say it involves humanitarian exchange. Uzbekistan and neighboring countries are important to Putin, who sees restoring the Soviet sphere of influence as part of his legacy.

The report also highlights China’s interest in Russia’s vast territory in the Arctic and the Northern Sea Route, which hugs Russia’s northern coast. Historically, those waters have been too icy for reliable shipping, but they are expected become increasingly busy because of climate change.

The route slashes shipping time between Asia and Europe. Developing that route would make it easier for China to sell its goods.

Russia historically tried to maintain strict control over Chinese activity in the Arctic. But Beijing believes that Western sanctions will force Russia to turn to China to maintain its “aging Arctic infrastructure,” according to the FSB document. Already, Russian gas giant Novatek has relied on China to salvage its Arctic liquefied natural gas project, after previously using the American oil services firm Baker Hughes.

The FSB asserts that Chinese spies are active in the Arctic, as well. The report says Chinese intelligence is trying to obtain information about Russia’s development of the Arctic, using institutions of higher education and mining companies in particular.

But despite all of these vulnerabilities, the FSB report makes clear that jeopardizing the support of China would be worse. The document squarely warns officers that they must receive approval from the highest echelons of the Russian security establishment before taking any sensitive action at all.