Mr. Trump was not impressed with Ms. Merkel’s handling of the migrant crisis, however: “Germany is being destroyed by Merkel’s naïveté, or worse,” he said. He suggested that Germany and the Gulf nations should pay for the “safe zones” he wants to set up in Syria for refugees, and for protecting them once built.

Throughout the two conversations, Mr. Trump painted a bleak picture of the United States as a diminished force in the world, an opinion he has held since the late 1980s, when he placed ads in The New York Times and other newspapers calling for Japan and Saudi Arabia to spend more money on their own defense.

Mr. Trump’s new threat to cut off oil purchases from the Saudis was part of a broader complaint about the United States’ Arab allies, which many in the Obama administration share: that they often look to the United States to police the Middle East, without putting their own troops at risk. “We defend everybody,” he said. “When in doubt, come to the United States. We’ll defend you. In some cases free of charge.”

But his rationale for abandoning the region was that “the reason we’re in the Middle East is for oil, and all of a sudden we’re finding out that there’s less reason to be there now.” He made no mention of the risks of withdrawal — that it would encourage Iran to dominate the Gulf, that the presence of American troops is part of Israel’s defense, and that American air and naval bases in the region are key collection points for intelligence and bases for drones and Special Operations forces.

Mr. Trump seemed less comfortable on some topics than others. He called the United States “obsolete” in terms of cyberweaponry, although the nation’s capabilities are generally considered on the cutting edge.

In the morning interview, asked if he would seek a two-state or a one-state solution in a peace accord between the Israelis and the Palestinians, he said: “I’m not saying anything. What I’m going to do is, you know, I specifically don’t want to address the issue because I would love to see if a deal could be made.”

But in the evening, saying he had been rushed earlier, he went back to a position outlined Monday to the American Israel Public Affairs Committee, the pro-Israel group. “Basically, I support a two-state solution on Israel,” he said. “But the Palestinian Authority has to recognize Israel’s right to exist as a Jewish state.”