WASHINGTON – President Donald Trump’s choice to be ambassador to China pledged Tuesday to leverage a personal relationship with Chinese President Xi Jinping to convince China that it is risking its own security if it fails to prevent a nuclear crisis with North Korea.

Iowa Gov. Terry Branstad (R) is expected to win confirmation and could be on the job in Beijing by the end of the month. He faced Senate questioning about the Trump administration’s shifting priorities in dealing with a country Trump had accused of “raping” the U.S. economy but now considers a crucial partner in heading off conflict with North Korea.

“It is probably the most pressing issue that we have right now,” Branstad said of the effort to talk North Korea out of nuclear weapons and missile capabilities that threaten the United States and its allies.

“I want to do everything I can to be a go-between between our two countries to help convince the leadership in China that it’s in their interest to work together to stop this dangerous direction that is coming out of North Korea,” Branstad told the Senate Foreign Relations Committee.

Branstad placed the complex and shifting U.S. relationship with China in personal and folksy terms. He said that although he has known Xi for more than 30 years and considers him a friend, he would not hesitate to challenge him on behalf of the United States.

He said little about Trump’s turnabout on China since his bristling campaign rhetoric blaming China for stealing American jobs and manipulating its currency to harm U.S. business. Branstad pledged to respect the “one China” policy governing U.S. policy toward Taiwan and criticized Chinese military activity in disputed waters of the South China Sea.

Although concerns over North Korea dominated, senators also asked about the new administration’s commitment to human rights, religious freedom and prosecuting the theft of intellectual property.

Committee Chairman Bob Corker, R-Tenn., opened the confirmation hearing on a contentious note, accusing China of “outright theft” of American intellectual property as well as “discriminatory trade and investment practices.”

Branstad got no hostile questions at his confirmation hearing and won praise from some of the panel’s Democrats.

“There really is not an option for a military first strike by the United States,” Sen Benjamin Cardin, D-Md., told Branstad. “We really are faced with changing their calculation in North Korea so they take action to eliminate this threat. Which takes China.”

China is responsible for 90 percent of North Korean trade and is the reclusive regime’s most important ally.

Branstad did not dispute allegations from senators of both parties that China has undermined U.N. efforts to rein in North Korea by looking the other way as the country skirts economic sanctions.

Branstad said additional sanctions on Chinese firms or other entities might be appropriate in response to sanctions-busting, but he otherwise advocated engagement and persuasion done quietly and without confrontation.

“Their leadership is critically important to doing that,” Branstad said. “It needs to be done in a way that they don’t feel it threatens them.”

Trump has warned China that if it cannot prevent North Korean nuclear advances, the United States will act on its own.

“China could play a critical role in convincing North Korea to dismantle its nuclear and missile programs, a strategic policy that would boost the security of America, China and the entire world,” Branstad said.

Branstad promised to “work every day to represent American values” to the Chinese leadership, including fair trade, human rights and a free press.

Branstad was chosen for one of the most important U.S. diplomatic postings because of his political loyalty and long experience with China, which is unusual among American politicians.

Branstad was an early and important Trump ally, a rare senior GOP elected official backing the businessman and outsider candidate over more experienced mainstream Republicans last year.

He also has managed the expansion of Iowa’s trade with China over six terms as the state’s governor while building a relationship with the man who became China’s president. As a young politician, Xi visited rural Iowa in 1985, when Branstad was in his first term as governor. The two men have corresponded and visited each other’s countries since, and Branstad aides say they can be frank with each other.

Trump now says he likes and appreciates the Chinese leader, whom he invited to his Florida resort for a two-day summit last month.

At a farewell dinner last week in Iowa, Branstad told state Republicans of his hopes for the job.

“I hope we can use that great first impression that we made to continue to build a relationship between our two countries for the benefit not only of the United States of America and the People’s Republic of China, but for all the people of the world,” the Des Moines Register quoted Branstad as saying.