The U.S. may soon be confronted with choosing one of two unappealing options as crises and negotiations in the Middle East blend together.

Both choices involve Iran, which is angling for a nuclear deal to open its economy while fighting what Dexter Filkins called "a much wider war, reaching from the Iranian frontier to the Mediterranean coast."

Until about a week ago, negotiators on all sides of the Iranian nuclear talks had said prospects for a comprehensive nuclear deal by a July 20 deadline were diminished. That was until the crisis in Iraq flared up and Iran seized the opportunity to step up and help the U.S. save face.

Iran has a point of leverage — and it seems to know it.

Rouhani's chief of staff, Mohammad Nahavandian, told reporters on Wednesday the nuclear negotiations served as a "test for confidence building." And he said if they come to a resolution "there might be opportunities for other issues to be discussed."

In other words — if the U.S. and President Obama really want Iran's help in stabilizing Iraq, something in which both sides have an interest, a nuclear resolution had better come soon.

"The Iranians desperately needed leverage," one European negotiator told The New York Times on Thursday. "They clearly think the American fear of getting sucked back into Iraq may be just the thing, at just the right moment."

The nuclear negotiations have stalled, however, because of a wide gulf of disagreement on a number of issues. The biggest disparity: Iran wants to eventually operate 150,000 uranium-enriching centrifuges, up from its current stock of 20,000 (about 10,000 of which are running). U.S., Russia, China, U.K., France, plus Germany (P5+1) want them to decrease that amount to the low thousands.

"The other side should abandon its excessive demands. Iran will never accept such demands," Foreign Minister Mohammad Javad Zarif told reporters on Friday.

The U.S. and other world powers don't seem willing to make a bad deal, which means that the two sides would have to extend the talks for another six months, exacerbating the nuclear crisis.

Back To Iraq

America's options in Iraq appear to be doing something drastic (such as airstrikes) or working with Iran.

Iranian Gen. Qassem Suleimani is running point on the ground as Iraq's army is bolstered by Iranian Revolutionary Guard forces (IRGC) and Iran-trained Shia militiamen, many of whom have returned this year after "protecting shrines" in Syria.

The U.S. is flying unmanned drones and manned F-18s over Iraq to collect surveillance and signaled that it will share intelligence with the Iranians. Obama said Thursday he would send 300 "military advisers" to Iraq to aid the country's security forces, as well as step up the U.S.'s intelligence-gathering capabilities in the country.

America working with Iran to fix Iraq places the U.S. in the middle of the sectarian war between Shias and Sunnis, which threatens to engulf the region after three years of increasingly bitter fighting in Syria.

Obama cited Iran's "hot and heavy" support for the Syrian regime of President Bashar Assad, which helped fuel the civil war into a sectarian nightmare as the mostly U.S. stayed on the sidelines.

"If Iran is coming in solely as an armed force on behalf of the Shia, and if it is framed in that fashion, then that probably worsens the situation and the prospect for government formation that would actually be constructive over the long term," Obama said Thursday.

Taken all together, the president has no good choice: Either make an ill-advised nuclear deal to appease Iran or work with Iran anyway and risk alienating the Sunni world.

Consequently, as researcher and Shia militia expert Phillip Smyth explained, "Washington must tread a fine line on this matter, supporting efforts to counter ISIS while actively distancing itself from and at least stating its opposition to Iran's direct and sectarian proxy deployments in Iraq."