The Obama administration and Iran, engaged in direct nuclear negotiations and facing a common threat from Islamic State militants, have moved into an effective state of détente over the past year, according to senior U.S. and Arab officials….

recent months have ushered in a change as the two countries have grown into alignment on a spectrum of causes, chief among them promoting peaceful political transitions in Baghdad and Kabul and pursuing military operations against Islamic State fighters in Iraq and Syria, according to these officials.

The Obama administration also has markedly softened its confrontational stance toward Iran’s most important nonstate allies, the Palestinian militant group Hamas and the Lebanese militant and political organization, Hezbollah. American diplomats, including Secretary of State John Kerry, negotiated with Hamas leaders through Turkish and Qatari intermediaries during cease-fire talks in July that were aimed at ending the Palestinian group’s rocket attacks on Israel, according to senior U.S. officials.

U.S. intelligence agencies have repeatedly tipped off Lebanese law-enforcement bodies close to Hezbollah about threats posed to Beirut’s government by Sunni extremist groups, including al Qaeda and its affiliate Nusra Front in Syria, Lebanese and U.S. officials said.