Trump said on Monday that the United States would engage in “direct” negotiations with Iran next Saturday in a last-ditch effort to rein in the country’s nuclear program, saying Tehran would be “in great danger” if it failed to reach an accord.

In a social media post, Iran’s foreign minister, Abbas Araghchi, confirmed that talks would take place on Saturday in Oman, but he said that they would be indirect, meaning intermediaries would work with the two sides. “It is as much an opportunity as it is a test. The ball is in America’s court,” Mr. Araghchi said.