LONDON — At his first international summit as prime minister of Britain, Boris Johnson needed somehow to capitalize on his friendship with President Trump, yet show that he is not the president’s poodle and avoid falling out with Europe’s most important leaders at the same time.

On Sunday at the gathering of G7 leaders in Biarritz, France, he just about walked that diplomatic tightrope, even if he got little in the way of reassuring signals — and offered even fewer — about how Britain will confront its big, imminent challenge: Brexit.

The summit marked the arrival on the global stage for Mr. Johnson, who has promised to withdraw Britain from the European Union by the Oct. 31 deadline, with or without an agreement.

In a meeting with Mr. Trump — their first face-to-face meeting since Mr. Johnson became prime minister last month — the president praised Mr. Johnson as the “right man” to deliver Brexit, a project both leaders favor, and promised a “very big trade deal” with the United States once Britain had left the bloc.