Secretary of State Antony Blinken called the U.S.’s dealings with China the defining test of the century, as he set out a broad agenda that he said would do more to ensure that foreign policy benefits ordinary Americans.

Blinken said the U.S. approach to China will be “competitive when it should be, collaborative when it can be and adversarial when it must be.”

“China is the only country with the economic, diplomatic, military, and technological power to seriously challenge the stable and open international system,” Blinken said in remarks delivered by video from the State Department.

The speech, Blinken’s first as the top U.S. diplomat, drew a contrast with foreign-policy priorities under former President Donald Trump, citing the importance of fighting climate change and the need to re-engage with the rest of the world after Trump shunned institutions like the United Nations and backed out of multinational commitments.

Referring indirectly to events including the Jan. 6 attack on the U.S. Capitol, he said democracy is under strain globally, including at home, and cast strengthening it as crucial to national security.

“Shoring up our democracy is a foreign policy imperative,” he said. “Otherwise we play right into the hands of adversaries and competitors like Russia and China. There’s no question that our democracy is fragile.”

Blinken described the speech as a preview of how U.S. diplomacy will carry out “interim strategic guidance” on national security and foreign policy that he said President Joe Biden would release later on Wednesday.

Blinken also offered something of a confession that trade deals pursued by past administrations—including the Obama administration in which he and Biden served—sometimes failed to benefit American workers. It was a criticism frequently offered by Trump.

Saying the current administration is “building out the hard lessons learned,” Blinken said, “We will fight for every American job and for the rights, protections and interests of all American workers.”

He also vowed that the U.S. would be more wary of entering into overseas wars, a break with past administrations that embroiled U.S. soldiers in Afghanistan and Iraq, and backed military actions that resulted in chaos, such as in Libya.

“Diplomacy, not military action, will always come first,” Blinken said. “We’ve seen how they’ve often come at far too high a cost, both to us and to others.”