DAVOS, Switzerland — President Trump sought to repair one diplomatic rift while widening another on Thursday as he smoothed over months of friction with Britain but threatened to cut financial aid to the Palestinians after they withdrew from peace discussions.

Separate meetings with the prime ministers of Britain and Israel showcased the wide disparity in Mr. Trump’s ties with key counterparts. His session with Prime Minister Theresa May of Britain was tense as they tried to put the relationship back on track, while his sit-down with Prime Minister Benjamin Netanyahu of Israel was warm as the two agreed on what they cast as Palestinian intransigence.

The strain between the United States and Britain, its closest ally, increased when Mr. Trump retweeted anti-Muslim videos posted by an ultranationalist British group, which Mrs. May called “wrong,” and culminated in his decision to cancel a scheduled visit to London, where the mayor declared him unwelcome. Sitting down on Thursday with Mrs. May, Mr. Trump said he was now exploring a visit later in the year and dismissed talk of discord as a “false rumor.”

“We’re on the same wavelength, I think, in every respect,” Mr. Trump said. “And the prime minister and myself have had a really great relationship, although some people don’t necessarily believe that, but I can tell you it’s true.” He expressed respect for Mrs. May, and said he thought “the feeling is mutual from the standpoint of liking each other a lot,” adding that the two were “very much joined at the hip” on military matters.