PARIS — President Trump and his aides have sent a dizzying, seemingly conflicting set of messages to Iran in recent weeks, ordering more troops to the Middle East and a carrier to the Arabian Sea as military threats even while declaring that Washington is seeking new negotiations, not war.

European allies, still trying to save a 2015 deal to restrain Iran’s nuclear program that Mr. Trump abandoned a year ago, are trying to make sense of the administration’s strategy.

And the government in Tehran, humiliated by Mr. Trump’s hard-line policies, has all but frozen diplomacy with Washington. “Standing and resisting the enemy’s excessive demands and bullying is the only way to stop him,” Iran’s supreme leader, Ayatollah Ali Khamenei, said on Tuesday.

Yet it appears Mr. Trump wants to play the role of neither conqueror nor courtier, walking a fine line between military threats and diplomatic outreach but committing to neither. At various points, he has warned that there is “always a chance” of conflict with Iran while urging negotiations — with no visible plan to make them happen.