BRUSSELS — NATO leaders on Monday agreed to pivot their alliance to a more confrontational stance toward China, a landmark shift as President Biden sought to boost and reorient the organization after the eruptions and conflict that marked the Trump era. Biden, in public comments and private meetings at the midway point of his first overseas trip as president, worked to reassure dubious allies that America is back and to rally like-minded democracies in what he repeatedly cast as an existential battle against the world's autocracies. Monday's discussion was a sharp expansion of NATO's efforts to confront Beijing after years when China was outside the focus of the defensive alliance. The allies agreed in their closing communique that "China's stated ambitions and assertive behavior present systemic challenges to the rules-based international order." "I think that there is a growing recognition over the last couple of years that we have new challenges," Biden said during a sit-down discussion with NATO Secretary General Jens Stoltenberg. "And we have Russia that is not acting in a way that is consistent with what we had hoped, and as well as China," Biden said. He added that members of the Group of Seven had "stepped up as well," an apparent reference to a new willingness among the economic club to criticize some aspects of Chinese behavior. After the meeting, Stoltenberg said it was an achievement for the alliance to start pivoting toward China. "It's not about moving NATO to Asia," he said. But, he added, "we need to address the challenges that the rise of China poses to our security even though many allies have a lot of economic ties with China." The notion of shifting NATO's attention at least somewhat to China extends the theme of Biden's European trip, after he also tried to sharpen China-related discussions at the Group of Seven summit in Britain. Biden has repeatedly cast the struggle of the current generation as one between democracies and autocracies such as China and Russia, and he reiterated that concern at a news conference Monday in Britain before departing for Brussels. "We're in a contest — not with China per se — but a contest with autocrats, autocratic governments around the world, as to whether or not democracies can compete with them in the rapidly changing 21st century," Biden said.