The chief civil servant of the North Atlantic Treaty Organization said former President Donald Trump's rhetoric about the organization does "undermine" the security of its members.

NATO Secretary-General Jens Stoltenberg made the comments during a press conference at the organization's headquarters in Brussels on Wednesday.

"The whole idea of NATO is that an attack on one ally will trigger a response from the whole alliance and as long as we stand behind that message together, we prevent any military attack on any ally," Stoltenberg said.

BIDEN SAYS TRUMP QUESTIONING EUROPEAN COMMITMENT TO NATO IS 'DUMB,' 'UN-AMERICAN'

Stoltenberg NATO

Secretary-General Jens Stoltenberg addresses a media conference prior to a meeting of defense ministers at NATO headquarters in Brussels. (AP Photo/Virginia Mayo)

He continued, "Any suggestion that we are not standing up for each other, that we are not going to protect each other, that does undermine the security of all of us."

The warning comes after Trump offered harsh words for NATO allies at a campaign rally last week, going so far as to suggest the U.S. would not defend NATO allies that do not contribute their full share.

Trump recalled a conversation he had with the president "of a big country," who he says asked him if they did not increase their defense contribution to the North Atlantic alliance "and we’re attacked by Russia, will you protect us?"

NATO MEMBERS BRACE FOR TRUMP WIN AS RECORD NUMBER OF MEMBERS MOVE TO MEET SPENDING PLEDGES

"NATO was busted until I came along," Trump said. "I said, ‘Everybody’s gonna pay.' They said, ‘Well, if we don’t pay, are you still going to protect us?' I said, 'Absolutely not.' They couldn't believe the answer."

TRUMP SOUTH CAROLINA

Former President Donald Trump walks out to speak at a Get Out The Vote rally held at Coastal Carolina University in Conway, South Carolina. (Jabin Botsford/The Washington Post via Getty Images)

While Stoltenberg expressed concern at Trump's remarks, the former president's comment did spark a rush to confirm member countries' contributions in the coming year.

The NATO chief announced that 18 of the alliance's 31 members are on track to meet their pledges of contributing 2% of GDP to the group. European states are on track to contribute $380 billion this year, and Germany will meet its 2% pledge for the first time since the Cold War.

CLICK HERE TO GET THE FOX NEWS APP

The figures show a dramatic uptick compared to 2023, which saw just 11 NATO allies meet their 2% spending pledge.

Fox News Digital's Anders Hagstrom contributed to this report.