For months before Iran's June elections, front-runner and former President Ali Akbar Hashemi Rafsanjani sent clandestine messages to Washington and to Europe: "You can trust me to lead Iran to moderation."
European officials from Britain, France, and Germany, long engaged in nuclear negotiations with Iran, framed their hopes around the likely new president.
But in August, it was hard-line victor Mahmoud Ahmadinejad who took the oath of office after an unexpected surge to the right by voters that also strengthened the grip of military and security forces on Iran's nuclear program.
Within days, Mr. Ahmadinejad rejected a final (and not very good, by all accounts) European proposal, and resumed enrichment activities that had been suspended for nearly two years. Within weeks, the UN's nuclear watchdog agency, under US and EU pressure, voted to refer Iran to the Security Council - a move that shocked Iran's top leadership.
Today, as both sides suggest that talks may soon resume, diplomats and analysts argue that the political changes in Iran are so fundamental that the nuclear red lines of the EU and Iran may have become irreconcilable.
"The pivotal point is the orientation of the new government," says an Iranian analyst who asked not to be named. "It is backed by military forces in Iran, which makes it even more controversial to give it some nuclear leverage."
2005 Nobel Peace Prize winner Mohammed ElBaradei, head of the UN International Atomic Energy Agency (IAEA), last week said he was hopeful the "hiccup" will be solved and that talks can soon resume.
Iran insists on its "right" to enrich uranium for peaceful purposes, as codified by the nuclear Nonproliferation Treaty (NPT), to which it is a signatory. With the possibility of a decision against Iran at the next IAEA meeting in November, Tehran's new top negotiator, Ali Larijani, last week threatened to "use [Iran's] full might to endanger America's interests" if Washington increases pressure.
While the US has played no overt role in the talks, Europeans admit the tough line from Washington has shaped EU proposals. And Iranians often point out that any nuclear deal could be irrelevant or even dangerous, without US involvement.
"You have to be realistic; there was no point putting together a package that the US couldn't support," says a European diplomat familiar with the talks. Though Washington at first disparaged the European diplomatic efforts, it has gradually come around to support them.
"The Americans and Europeans were prepared to offer Iran a package deal, if Rafsanjani came to power - they counted on it, and were hopeful for it [because] they would be assured that he would decrease the power of military groups in Iran," says the analyst.
"The 'grand bargain' was more than nuclear [issues]," the analyst adds. "The US would lift sanctions in return for a number of steps like Iran accepting a two-state [Palestinian-Israel] solution ... US security guarantees would have been part of the package. That is what the [Iranian] system is looking for from the Americans."
How far any such deal could have stretched remains far from clear, and some diplomats dismiss it completely. Though not directly involved in any European offer, the US had made a previous gesture to supply aircraft parts and an assurance that it would not block Iran's WTO progress. Europeans say the August offer was meant to be the first step toward broader talks.
"Hard-liners are very much in the ascendant, and voices for enrichment will be much stronger," says the diplomat. "They haven't started [actual] enrichment. They know that's the real red line, where you break off the diplomatic track for good."
But at the same time, Rafsanjani's unelected Expediency Council has in recent days been given sweeping new oversight powers, in an apparent bid by Iran's supreme religious leader, Ayatollah Ali Khamenei, to rein in hard-liners. In recent meetings with foreign diplomats, Rafsanjani has also explicitly stated that the supreme leader and the Expediency Council together - with no reference to the Ahmadinejad government - will "determine everything in the country."
And during Friday prayers in Tehran on Sept. 30, Rafsanjani carefully calibrated his words, describing the need for "diplomacy and not slogans," an indirect swipe at Ahmadinejad's tough speech at the UN just days earlier.
"Maybe we have overestimated the capacity of Rafsanjani to make a deal," says another European diplomat. "Nobody thought it would be easy, because there is consensus in this regime [on pursuing nuclear technology]. The difference between them is tactics."
Diplomats note that Rafsanjani used "all his weight," just before the election, to convince Ayatollah Khamenei not to permit the resumption of enrichment activities until after the vote, as hard-liners demanded.
Iran has since warned that it could reverse voluntary acceptance of the NPT Additional Protocol, which enables snap inspections. Or Iran could withdraw from the NPT altogether, heightening concern of a secret bomb program and risking a US or Israeli military response.
"It's not rational to tell Iran not to enrich uranium - it's our right," says Amir Mohebian, political editor of the conservative Resalat newspaper. Iran can prove its peaceful intention through greater transparency, he says, if the IAEA guarantees a supply of nuclear fuel for five years, while talks continue.
"We have spent huge money, $4 billion for enrichment, so we can't stop it," he adds.
But the resurgent military role has set off alarm bells. "I think it stands to reason that the one logical conclusion of the military involvement in a nuclear program is that they are trying to build a nuclear weapon," US State Department spokesman Sean McCormack said last week.
The European position also appears to have hardened since spring, when diplomats in Tehran spoke of a face-saving acceptance of Iran's right to nuclear technology by permitting a very limited, experimental enrichment project.
One document circulated between embassies in Tehran, with a section labeled "Compromise Solution" that permitted Iran a pilot project of a few hundred centrifuges. Iran wanted 5,000 centrifuges, which are central to a key method of uranium enrichment, for the project.
But European diplomats say that no such offer was ever put to the Iranians, and that "no enrichment at all" has been their constant message.
Iranians often point out the inconsistencies in their own neighborhood. Israel, Pakistan, and India are all nuclear weapons states, did not sign the NPT, and have been little punished for secretly building the bomb.
The US in July, in fact, agreed to a deal for extensive civilian nuclear cooperation with India. But, says one of the Western diplomats, "a regime that threatens to destroy Israel with the Shahab-3 [missile] can't have nuclear weapons. [W]e can't deal with Iran like we deal with India, which has proven to be a responsible nuclear weapons power."