WASHINGTON — Terry Branstad, the Iowa governor who has long embraced China as a market for his state’s pork and soybeans, was tapped Wednesday by President-elect Donald J. Trump to represent the United States in one of its most complex and increasingly contentious foreign relationships, as his ambassador to China.

In choosing Mr. Branstad, 70, an amiable politician who likes to describe President Xi Jinping of China as an “old friend,” Mr. Trump sounded a softer note alongside his unrelenting criticism of China’s economic relationship with the United States.

At an event on Wednesday morning at Cipriani restaurant in Manhattan to raise money for his inauguration, Mr. Trump told the audience that Mr. Branstad was a great choice. “He knows them all,” Mr. Trump said three separate times, according to an attendee. The selection was first reported by Bloomberg News.

China was quick to embrace the choice, even before Mr. Trump’s announcement. At a regular news briefing in Beijing on Wednesday, Lu Kang, a spokesman for the Ministry of Foreign Affairs, described Mr. Branstad as “an old friend of the Chinese people,” a phrase used to describe politicians trusted by Beijing. “We would welcome him playing a bigger role in promoting Sino-American relations,” Mr. Lu said of Mr. Branstad.