WASHINGTON — President Trump, by demanding on Friday that European allies agree to rewrite the Iran nuclear deal within 120 days or he will kill it, set himself a diplomatic challenge that would be formidable even for an administration with a deep bench of experienced negotiators.

For Mr. Trump, who has filled his national security ranks with retired military officers and allowed his State Department to languish, the challenge is even more profound. And it is not limited to Iran: The North Korea crisis has taken a sudden turn toward diplomacy, with the unexpected opening of talks between the North and the South.

On both fronts, current and former officials say, the Trump administration is being forced to rethink strategies that had been driven largely by military considerations. Many say the White House is ill equipped to deal with the prospect of a South Korean détente with the North’s Kim Jong-un or the recent eruption of political unrest in Iran.

The antigovernment protests in Iran have complicated Mr. Trump’s calculations about whether to rip up the nuclear deal negotiated by the Obama administration, several officials said. While the unrest has made the president even more determined to punish the Iranian leadership, it has also reinforced the conviction of European leaders that the deal should be preserved.