President Trump reaffirmed the U.S.’s commitment to Article 5 during a visit to Poland on Thursday, promising to defend another NATO ally under attack and praising alliance members for beginning to pay more under his criticism.

“To those who would criticize our tough stance, I would point out that the United States has demonstrated not merely with words but with its actions that we stand firmly behind Article 5, the mutual defense commitment,” he said to applause.

“Words are easy, but actions are what matters,” he said.

Trump had taken a tough stance on the NATO alliance during his presidential campaign, criticizing members who did not meet their obligations for spending at least two percent of their gross domestic product on their own defense.

That criticism was vindicated last month when NATO’s Secretary General Jens Stoltenberg said alliance members’ defense spending was set to rise at the fastest rate it has in three years, in part due to Trump’s urging.

“Americans know that a strong alliance of free, sovereign and independent nations is the best defense for our freedoms and for our interests. That is why my administration has demanded that all members of NATO finally meet their full and fair financial obligation,” Trump said.

“As a result of this insistence, billions of dollars more have begun to pour into NATO. In fact, people are shocked. But billions and billions of dollars more are coming in from countries that, in my opinion, would not have been paying so quickly,” he said.

Trump’s criticism had shocked members of the foreign policy establishment in Washington, who said Trump’s presidency would be dangerous for the world.

They criticized Trump for not explicitly reaffirming Article 5 in May during his first visit as president to Brussels, although, weeks later, Trump did so during a Rose Garden press conference with the Romanian prime minister in response to a question by a Romanian journalist.

Even after that, a CNN political analyst falsely accused Trump of never reaffirming Article 5.

On July 4, Julian Zelizer, also a historian at Princeton University, claimed on air that Trump had never made an Article 5 commitment.

Zelizer said: “Look, there’s something very important President Trump has to do, actually, and it is to affirm his commitment to NATO – something he has not done.”

“I don’t know if it will happen,” he continued. “But I think it’s actually quite urgent. I think it’s something Putin needs to hear. For all the bluster, I think it’s something he has not said. And I think it would be very helpful to the administration.”

Trump on Thursday continued to urge NATO members to keep doing more for their own protection, which has largely been underwritten by the U.S. since the end of World War II.

“Europe must do more. Europe must demonstrate that it believes in its future by investing its money to secure that future,” he said.

Trump’s visit was well-received in Poland, where he is a popular figure. During his speech, which was delivered in Krasiński Square in Warsaw, he was interrupted by cheers of “Donald Trump! Donald Trump! Donald Trump!”