LONDON — President Trump began a two-day summit meeting on Tuesday to mark the 70th anniversary of NATO — an alliance that has been strained, in part, by his own brash handling of overseas allies — by lashing out at one of them.
In a meeting with Jens Stoltenberg, the secretary general of NATO, Mr. Trump said President Emmanuel Macron of France had been “very insulting” to the alliance when he warned recently about the “brain death” of NATO.
Mr. Macron had suggested that Europe could no longer assume unwavering support from the United States. The two leaders were scheduled to meet later in the day.
“It’s very disrespectful.” Mr. Trump said, before adding, “It’s a very dangerous statement for them to make.”
Mr. Trump’s visit comes as leaders across Europe struggle to balance the shared goal of combating the rising influence of global adversaries — China will be a main focus — and containing the whims of other unpredictable members, including President Recep Tayyip Erdogan of Turkey.
Mr. Trump’s defense of NATO against Mr. Macron’s comments were something of a role reversal for the two leaders — in the past, Mr. Trump has been so disruptive at NATO meetings that he triggered an emergency session. A goal of the anniversary meeting was to avoid any formal disruptions this time around.
This time, however, it was Mr. Macron’s comments that were viewed as unhelpful to the alliance.
Heather A. Conley, director of the Europe program at the Center for Strategic and International Studies, said Mr. Macron sees an opportunity to assert French leadership in Europe, with Britain moving toward leaving the European Union and the German government enmeshed in its own political troubles.
“President Macron is seizing that moment, seeking to be disruptive in his own way, and so we will see how that works,” she said.
In the background of these competing global interests is Mr. Trump’s impeachment, which threatens to throw off his focus and overshadow a victorious message that administration officials brought along with them to Britain: Last week, officials told reporters that the president had been “spectacularly successful” in urging allies to increase their military spending by around $100 billion.
Of course, those allies have their own priorities. Mr. Trump is scheduled on Tuesday to meet one-on-one with Mr. Macron, who has shifted from a charm offensive with Mr. Trump to a more confrontational approach. Later on Tuesday, Mr. Trump will also meet with Prime Minister Justin Trudeau of Canada and host a private round table with his supporters.
Notably absent from the president’s schedule is a one-on-one meeting with the British prime minister, Boris Johnson, who is days away from an election and is struggling to manage the political fallout from after a lone extremist fatally stabbed two people on London Bridge on Friday. Mr. Johnson has been desperate to keep Mr. Trump at arm’s length.
Instead, Mr. Johnson will host the president and other leaders in a group reception at 10 Downing Street on Tuesday evening, before the Trumps head to Buckingham Palace for a reception with Queen Elizabeth II.
A chief concern in Britain is that Mr. Trump could attempt to change the course of next week’s election, scheduled for Dec. 12, by sending inflammatory tweets or wading into local politics in interviews.
During his meeting with Mr. Stoltenberg, the president said he would avoid interfering.
“I’ll stay out of the election,” Mr. Trump said. “I think Boris is very capable and he will do a good job.”
Steven Erlanger contributed reporting.