WASHINGTON — When President Obama wrote last month to Iran’s supreme leader, Ayatollah Ali Khamenei, urging him to overcome a decade of mistrust and negotiate a deal limiting Tehran’s nuclear ambitions, it was perhaps the president’s last effort to reach a reconciliation with Iran that could remake the Middle East.

Today, Mr. Obama needs a foreign policy accomplishment more than ever, and he sees time running out on his hope of changing the calculus in a Middle East where Americans are, against his instincts, back on the ground. But the forces arrayed against a deal are formidable — not just Mr. Khamenei and the country’s hard-liners, but newly empowered Republicans, some of his fellow Democrats, and many of the United States’ closest allies.

As negotiators head back to Vienna this week for what they hope will be the final round of talks, Mr. Obama’s top national security advisers put the chance of reaching an agreement this month at 40 to 50 percent. “In the end this is a political decision for the Iranians,” Mr. Obama told a small group of recent visitors to the White House, a statement that could be true for him as well.

Yet even if a deal is struck it will be the beginning of an argument, rather than the end of one. For many of the president’s adversaries, the details of whatever deal he emerges with — how much warning the West would have if Iran raced for a bomb, for example — are almost beside the point.