After years of increasing tensions that nearly led to war, Iran has moderated its approach to the West, shifting from a policy of provocation to one of limited cooperation. The change reflects an effort to avoid direct confrontation with the United States that the Iranians say could benefit President Trump in the November election.