The things that probably keep Barack Obama up at night — terrorist networks, covert nuclear programs and chemical weapons — can often be countered with off-the-peg reasoning: drones, sanctions, inspections, or even the threat of intervention. Much more difficult is working out how to stop allies from destroying what he hopes will be the signature achievement of his second term: a historic opening to Iran. When it comes to the Middle East, Obama’s thorniest problems come not from his enemies, but from his friends.

With the possibility of bilateral meetings between the U.S. and Iran in Geneva, and supported by the U.S.-Russian deal on chemical weapons in Syria, there is a tantalizing prospect that the Iranian regime could become a partner to the U.S., rather than a rival.

It is too early to know if Iranian President Hassan Rouhani is able to deliver, but as diplomats gather in Geneva for U.N. talks, it is not hard to see why President Obama would invest so much hope in a deal. A former Democratic congressman who knows Obama well explained to me that, like healthcare on the domestic front, it would be a bold, game-changing initiative. And, like healthcare, an alliance with Iran eluded President Bill Clinton.

Obama recognizes that there is the danger of a full-blown regional sectarian conflict in the Middle East. If diplomacy fails with Iran, Obama could find himself remembered as the president who took the United States into two new Middle East Wars — in Iran and Syria — rather than the one who ended two wars in Afghanistan and Iraq.

Rouhani’s stated goals seem straightforward: reversing the crippling sanctions in Iran to improve the economic situation and elevating his country’s international standing. Javier Solana — Europe’s former top diplomat who opened nuclear talks with Rouhani when Rouhani was Iran’s chief nuclear negotiator — told me that Rouhani “is a rational person who you can do business with.” Since coming to power, Rouhani has taken steps to change the mood. He appointed the intelligent and western-friendly Mohammad Javad Zarif to the foreign ministry, wresting control of the nuclear dossier from the country’s Supreme National Security Council and handing it to Zarif’s foreign ministry. Most intriguingly, he appointed Ali Shamkhani, an Iranian war hero of Arab origin, to be head of the Security Council.