He is also keeping an eye on domestic opponents as a general election becomes a possibility.

Ahead of a potentially chaotic no-deal Brexit on Oct. 31, Mr. Johnson needs President Trump’s help to cushion the economic impact. But he can ill afford to appear too chummy, given Mr. Trump’s unpopularity among both Europeans and Britons.

Analysis: Mr. Johnson hopes that the prospective damage to European economies, especially Ireland, will force Brussels to reopen negotiations and drop the “backstop” designed to assure there is no hard border between Ireland and Northern Ireland. European leaders, on the other hand, will be loath to make concessions with an election potentially imminent.

Germany: On Wednesday in Berlin, Mr. Johnson’s first stop, Chancellor Angela Merkel effectively challenged him to produce a detailed, practical solution within 30 days to avoid a hard Brexit.