WASHINGTON (AP) -- The United States' engagement in the volatile and unpredictable Middle East got more complicated this week, as American and Iranian negotiators sought a historic nuclear agreement while the U.S. provided intelligence for a Saudi-led air campaign against Iran-backed rebels in Yemen.
The two efforts, diplomatic and military, underscore the sometimes conflicting and oftentimes country-by-country alliances that are guiding U.S. policy in the region. The collage is largely framed by America's difficult relationship with Iran.
Despite severing diplomatic ties 36 years ago, the adversaries recently have found some means of direct and indirect cooperation. Beyond the nuclear talks, they are both helping Iraq's government fight Islamic State extremists.
At the same time Washington and Tehran are locked in a proxy war in Syria, where the U.S. is arming insurgents battling the Iran-backed government. A reverse conflict could be emerging in Yemen, where Washington is assisting the military intervention by Sunni powerhouse Saudi Arabia against Iran-supported Shiite rebels.
A look at several crises in the Middle East and how the Obama administration is approaching matters:
President Barack Obama's biggest national security goal is reaching a diplomatic agreement that would prevent Iran from developing nuclear weapons. But achieving such a goal through negotiation, and not through military or economic pressure, means it requires cooperation from the Islamic Republic.
Secretary of State John Kerry is leading the U.S. in talks in Lausanne, Switzerland, hoping to reach an outline of a deal over the next several days that would curb Iran's nuclear program in exchange for relief from crippling economic sanctions.
But Obama has said a deal could lead to a "better path" that includes greater trade ties, foreign investment, cultural exchange, scientific partnerships and jobs for young Iranians. The prospect of a nuclear accord and even the tiniest steps toward U.S.-Iranian rapprochement are prompting deep concern and even opposition among America's traditional allies in the neighborhood.
Israel has lobbied aggressively against the deal in the United States, claiming it would pave the way for an Iranian nuclear arsenal. Saudi Arabia has threatened to explore greater nuclear technology of its own. Other Sunni governments want greater U.S. commitment to their defense. And all have spoken gravely of the implications of what they see as Washington cozying up to Tehran.
Hoping to ease their concerns, the U.S. has emphasized repeatedly it isn't shifting alliances.
In Iraq, the U.S. and Iran actively support a common ally.
American airstrikes started this week to help Iraqi troops retake the northern city of Tikrit from Islamic State extremists. Until recently, the Iraqis there were fighting side-by-side with Shiite militias and Iranian special forces. But they withdrew as a condition of the U.S. air intervention, Army Gen. Lloyd Austin told a congressional panel Thursday.
Although the Americans and Iranians share the common goal of defeating Islamic State extremists, they differ on tactics. Washington has cited reports of human rights abuses by Iranian-backed militias and criticized the Iranian-led operation in Tikrit for lacking precision firepower, proper command from the Iraqi government and a coherent plan for maneuvering ground forces against a dug-in enemy.
Both sides deny that they are actively coordinating military strategy, though U.S. officials have spoken of working with the Iraqis as a go-between to "deconflict" operations. The dynamic has unsettled Sunni Arab states likes Saudi Arabia.
In Syria, the U.S. and Iran are on a clearer collision course. While each again speaks of combating the Islamic State group, they clash on their views of the Syrian government and the country's four-year rebellion.
The U.S. is arming and training a primarily Sunni force described as moderate, working with Sunni states such as Saudi Arabia, Turkey and Jordan. The rebels have the double objective of defeating the terrorists and ousting President Bashar Assad from power.
On the other side, the Iranians are providing military assistance to Assad's army and Hezbollah forces fighting the rebellion, and have deployed special forces of their own to help out.
The picture is similarly complicated in Yemen.
The U.S. is providing intelligence and logistical help for the Saudi-led airstrikes against the Houthi rebels who've seized the capital and much of the country, driving out the president. The Saudis and their Arab partners may now be planning a ground invasion.
But the Iranians are unhappy, and the threat of another wider war is clear. Despite the U.S's auxiliary role, Tehran is blaming Washington for the attacks. And it is calling the intervention a "dangerous step" that will fuel terrorism. The Iranians only acknowledge giving the Houthi rebels humanitarian support, not the advanced weaponry that the Saudis and others claim is being provided.
The U.S. is in an uncomfortable position, tied by its alliances to Sunni Arab states and conviction that Yemen's rightful government should be restored. But it doesn't want a protracted war that draws Iran in deeper, takes attention away from Yemen's highly active al-Qaida branch and other threats to the United States, or becomes a factor in U.S.-Iranian nuclear discussions.
Although Kerry "commended" Saudi Arabia's action in a telephone call with Arab foreign ministers Thursday, he then discussed the situation with Iranian Foreign Minister Mohammad Javad Zarif on the sidelines of the nuclear talks. Details of that conversation were kept private.