For decades, the United States has exhorted its allies to put more money into their military budgets, arguing that if the alliance is called on to defend a member country, the United States would have to shoulder too much of the load. But European governments have different priorities when it comes to military spending than the United States. Iceland, for instance, has no military. And Germany, which since the end of World War II has rejected military force outside self-defense, spends only 1.2 percent of its G.D.P. on the military.

European Union budgetary rules also constrain some NATO countries from increasing their budget deficits.

Martin Stropnicky, the Czech Republic’s defense minister, said in an interview that Mr. Mattis’s speech was not a surprise, and he did not view it as a threat. “He was absolutely calm and humble and modest,” Mr. Stropnicky said, adding that his government had increased its military spending. But the Czech Republic still spends just over 1 percent of its G.D.P. on its military, according to NATO.

Mr. Trump is expected to visit NATO headquarters in May when the alliance holds its leaders’ summit meeting.

This meeting in Brussels was a tough European debut for the Trump administration, as Mr. Mattis also sought to convince NATO allies that the United States still values the alliance despite the president’s persistent critiques.

The latest disclosures, that members of Mr. Trump’s 2016 campaign and other confidants had communicated with Russia intelligence officers, and the resignation of Mr. Trump’s national security adviser, Michael T. Flynn, for misleading statements about his telephone conversation with Russian Ambassador Sergey I. Kislyak, raised allies’ anxiety.

Privately and publicly, a number of top NATO officials expressed concern about Russian meddling in elections in Europe and the United States. And they hung on Mr. Mattis’s every word on Wednesday, listening for clues to understand what the complex entanglements between Trump administration officials and Russian intelligence officers might mean for the trans-Atlantic alliance as it tries to confront a menacing and more aggressive Moscow.