HONG KONG — The Obama administration’s announcement that it would sell $1.83 billion worth of arms to Taiwan, including two warships and antitank missiles, has drawn a swift rebuke from China, which threatened to penalize the companies that made the armaments and summoned a United States diplomat to register an official protest.

Assistant Foreign Minister Zheng Zeguang told the American diplomat, Kaye A. Lee, in the meeting Wednesday night that Taiwan was “an inalienable part of China’s territory” and that Beijing strongly opposed the sale, according to a statement posted Thursday on the Foreign Ministry’s website.

“To safeguard our national interests, China has decided to take necessary measures, including imposing sanctions against companies involved in the arms sale,” Mr. Zheng said at the meeting, according to the statement.

The United States is required to provide weapons for Taiwan’s defense under a law dating to 1979, when Washington was shifting diplomatic recognition to Beijing and away from Taipei. In many ways, China’s reaction to the latest arms sale followed a familiar pattern.