A spokesman for the Foreign Ministry, Lu Kang, said those actions contradicted the agreements that emerged from Mr. Xi’s meetings with Mr. Trump at Mar-a-Lago in April, among them the decision to lift the beef ban, which had been in place since December 2003. If not reversed, they could have consequences, he said.
“We hope the United States administration could correct its mistakes, and bring China-U.S. relations back to the right track of healthy, stable and long-lasting development, so as not to affect bilateral cooperation in other important fields,” he said.
The arms sale to Taiwan, which Beijing considers part of its territory, was a violation of international law that “hurt China’s sovereignty and security,” Mr. Lu said, adding that China resolutely opposed it.
While administration officials said Mr. Trump had grown increasingly frustrated with China for putting more pressure on North Korea over its nuclear and missile programs, the response showed that officials here, too, were frustrated by Mr. Trump’s lurching strategy and cavalier style of tweeting new policy.
The latest steps, analysts said, felt retaliatory, and thus could prove counterproductive.
“The United States has stabbed us in the back,” said Wang Dong, an assistant professor at the School of International Studies at Peking University. He said the sanctions — the first against a Chinese company for trading with North Korea since 2006 — would undermine China’s willingness to help resolve the nuclear issue.
China has repeatedly said it shares the goal of halting North Korea’s nuclear program, or more broadly ensuring the entire Korean Peninsula is without nuclear weapons. It has also repeatedly maintained that it complies with trade sanctions that the United Nations Security Council imposed in an effort to isolate the North from resources to finance its nuclear and missile programs.
The extent of its cooperation, however, is disputed in Washington, even within the new administration. “The Chinese tried to gauge what were the minimal steps they could take to comply with the resolutions and show they were serious about North Korea’s program,” said Bonnie S. Glaser, a senior adviser for Asia at the Center for Strategic and International Studies in Washington. “And they miscalculated.”
Officials in Beijing, however, have puzzled over what they view as conflicting signals from Mr. Trump, like his harsh words on the campaign trail and the personal bonhomie toward Mr. Xi to persuade him to apply a new round of pressure. Analysts have pointed to a widespread confusion over the United States’ approach to North Korea, among other issues.
Those include Mr. Trump’s disavowal of the Paris agreement on climate change, now a priority of Mr. Xi’s and one that is expected to be contentious when Mr. Trump attends the Group of 20 meetings in Germany next week.
The sanctions against the two Chinese companies were announced in Washington by Mr. Trump’s treasury secretary, Steven T. Mnuchin, only hours before the agriculture secretary, Sonny Perdue, arrived in Beijing to promote “tasty, wholesome, healthy, safe U.S. beef.” The ban, ostensibly imposed because of concern over mad cow disease, was officially lifted in May and the first shipments have begun to arrive in Chinese supermarkets and restaurants.
“We think there’s an opportunity for agriculture to lead the way in the future relationship of commerce between our two wonderful countries,” Mr. Perdue, the former governor of Georgia, said as he appeared with the new American ambassador, another former governor, Terry Branstad, and a handful of hat-wearing cattlemen at a restaurant called Char.
Mr. Trump himself promoted the lifting of the beef ban as “REAL news,” evidence of his ability to entice concessions from China’s leaders on behalf of producers eager to feed China’s growing consumer class.
But his efforts to prod the Chinese on North Korea have, by his own account, failed. “While I greatly appreciate the efforts of President Xi & China to help with North Korea, it has not worked out,” the president wrote on Twitter more than a week ago.
The new sanctions targeted two companies, the Bank of Dandong and Dalian Global Unity Shipping — as well as two Chinese businessmen — accused of supporting North Korea through money laundering or illicit trade.
The bank, which could find itself cut off from the international banking system, is not among China’s biggest, raising the prospect that the administration could single out larger ones. A woman who answered the phone at the bank’s headquarters refused to respond to a request for comment.
Although an outright breach in relations remains unthinkable, given the depth of economic ties, the outward warmth Mr. Trump once showed Mr. Xi seems to have worn out its welcome in China. And it happened much sooner than officials here expected.
Shi Yinhong, a professor of international relations at Renmin University of China, said that Mr. Trump’s actions returned the relationship to normal: strained, with deep issues dividing the two countries.
Under Mr. Trump, he said, there was even less room for cooperation than under his predecessor, Barack Obama, who sought to work with China on climate change, for example.
“The latest situation has also illustrated that Trump is a leader without patience,” Mr. Shi said.