BEIJING — China on Friday ordered the United States to shut its consulate in Chengdu in response to the American closure of China’s equivalent branch in Houston, another escalation in the dispute between the world’s two largest economies.

While analysts in China called the retaliation measured, they said there was no end in sight to a conflict that spans trade and technology, freedom of the press and religion, students and scientists, human rights and the race for a coronavirus vaccine.

“Even though the relationship is worsening, we have not yet reached the worst point,” said Cheng Xiaohe, a professor of international relations at Renmin University in Beijing.

The bottom, he said, would be measured by two things: The closure of embassies in each country or military confrontation, whether intentional or accidental.

Analysts on both sides say bilateral relations are at their worst since 1972, when President Richard M. Nixon began overtures to the People’s Republic of China, leading to the start of formal diplomatic relations in 1979.

As if to signal an end to that era, Secretary of State Mike Pompeo delivered a speech at the Richard Nixon Presidential Library and Museum in Yorba Linda, Calif., on Thursday, in which he declared American engagement with China a dismal failure.

“The old paradigm of blind engagement with China simply won’t get it done. We must not continue it. We must not return to it,” Pompeo said. “Today, China is increasingly authoritarian at home, and more aggressive in its hostility to freedom everywhere else. . . . If the free world doesn’t change Communist China, Communist China will change us.”

China had vowed to retaliate after the United States on Tuesday ordered it to close its Houston consulate by Friday.

U.S. officials said the decision to move against the facility was made because while some degree of espionage is normal and expected, Houston was particularly active in facilitating the theft of scientific and technological material.

“The sum total of the Houston consulate’s activities went well over the line of what we are willing to accept,” the Justice official said, speaking on condition of anonymity to discuss sensitive issues. “And unless we disrupted it, it threatened to become even more aggressive in Houston and in other Chinese consulates nationwide.”

Personnel at the consulate recruited people for the Thousand Talents Program, which pays researchers overseas to aid China’s modernization, in part by stealing intellectual property at companies and universities, the officials said. Consulate officials directed the researchers what information to collect, the official said.

The official noted that the FBI had arrested a network of Chinese who concealed their affiliation with the People’s Liberation Army in applying for visas to conduct research in the United States. One of those arrested was holed up in the Chinese consulate in San Francisco until Thursday night and has a court appearance on Friday, the official said.

Chinese consulates also are bases of operations for “Fox Hunt” teams of agents sent from China to coerce economic fugitives or political rivals of President Xi Jinping to return to China, according to the official.

Beijing has been implicated in the vast majority of counterintelligence investigations by U.S. law enforcement authorities.

The FBI has seen a 1,300 percent increase in cases of economic espionage related to China over the last decade, said a U.S. intelligence official. About 60 percent of the cases prosecuted involve China, the Justice official said. A senior intelligence official, also speaking on the condition of anonymity, said about 80 percent of the 2,000 active intelligence probes are tied to China. A new investigation into China’s activities is opened every 10 hours on average, the official said.

“The decision to close the consulate in Houston reflects our long-standing concerns, but also patient U.S. diplomacy,” said a senior State Department official, who also spoke on the condition of anonymity. “We’re positive, optimistic people. But there comes a time when you have to say, enough is enough.

Some analysts thought that China would respond to the shutdown of its post in Houston by closing the U.S. Consulate in Wuhan, which has been empty since the novel coronavirus outbreak spread across the city in January and appears unlikely to reopen soon.

Instead, Beijing took aim at the post in Chengdu, a southwestern city staffed by about 15 American diplomats that hosts political, economic and agricultural departments and the Chengdu American Center, and issues visas.

The consul general in Chengdu is Jim Mullinax, a diplomat who has spent most of his career in Asia, serving in Indonesia, the Philippines, Indonesia, Taiwan, Hong Kong and Shanghai.

More than 13 million people were watching state broadcaster CCTV’s live stream from outside the Chengdu mission at lunchtime Friday. Photos posted on Chinese social media showed a heavy police presence around the compound on Consulate Road, and crowds of people gathering to see what was happening.

In announcing the mission’s closure, China’s Foreign Ministry in a statement blamed the Trump administration for bringing diplomacy into the countries’ wider rivalry and described Beijing’s response as legitimate and necessary.

“The current situation between China and the United States is something China does not want to see, and the responsibility rests entirely with the United States,” the ministry continued. “We once again urge the U.S. to immediately revoke the erroneous decision to create necessary conditions for the return of bilateral relations to normal.”

The closure will make it more difficult for U.S. officials to engage with ordinary Chinese citizens, which the State Department takes care to differentiate from the issues it has with the government. But U.S. officials said that was not a reason to stay silent.

“This is about making things right,” the senior State Department official said. “Forty years of broken glass needs be swept up and put back in order. And given the national security strategy of finally acknowledging that this really is a strategic competition, we’re going to do that.”

The U.S. Embassy in Beijing did not immediately respond to a request for comment, but later Friday it reissued travel guidance to Americans in China, warning them of arbitrary enforcement of local laws “for purposes other than maintaining law and order,” potentially involving detention and the use of exit bans.

The consulate’s geographic area of responsibility covers Sichuan, Yunnan, and Guizhou provinces, as well as Chongqing city and the Tibet Autonomous Region.

As it looks for new ways to confront China, the Trump administration has taken aim at Beijing’s restrictions on Tibet, which the Communist Party keeps under tight control. The administration this month said it was limiting visas for an unspecified number of Chinese officials because Beijing obstructs access to Tibet by American diplomats and other officials, journalists and tourists. Only once has the U.S. ambassador to China been granted permission to travel to Tibet and view the situation firsthand, said the State Department official.

Asked why Chengdu was chosen, Foreign Ministry spokesman Wang Wenbin said Friday that some of the personnel there had “interfered in China’s internal affairs and harmed China’s national security interests,” an apparent reference to American officials’ interest in Tibet.

Morello and Nakashima reported from Washington. Lyric Li and Liu Yang in Beijing contributed to this report.