* Begin three-day talks in Vienna on lasting nuclear pact
* Powers want Iran nuclear curbs, Tehran an end to sanctions
* Substantial gaps remain but sides hope for deal by July 20
* U.S. official cautions against excessive optimism (Updates with talks starting, Iranian, Israeli quotes)
By Louis Charbonneau and Justyna Pawlak
VIENNA, May 14 (Reuters) - Six world powers and Iran launched a decisive phase of diplomacy on Wednesday to begin drafting a lasting accord that would curb Tehran's contested nuclear activity in exchange for a phased end to sanctions that have hobbled the Iranian economy.
After three months of floating expectations rather than negotiating possible compromises, the sides now aim to devise a package meant to end years of antagonism and curtail the risk of a wider Middle East war with global repercussions.
Washington's decades-long estrangement from Iran could ease, improving international stability, if a deal were done but U.S. officials warned against unwarranted optimism given persisting, critical differences between the sides.
In the next two months, the United States, Russia, China, France, Britain and Germany will want Iran to agree to dramatically cut back its uranium enrichment programme, which they fear could lead to the making of atomic bombs, while Iran wants them to eliminate sanctions against its oil-based economy.
Diplomats from both sides have said they want to resolve all sticking points about issues such as Iran's capacity to enrich uranium and the future of its nuclear facilities, as well as the timeline of sanctions relief, by a July 20 deadline.
After that, an interim deal they struck last November expires and its extension would probably complicate talks.
An accord in two months is far from assured, with Western diplomats warning that divisions could prove insurmountable.
"Quite frankly, this is very, very difficult," a senior U.S. official told reporters on the eve of the talks, speaking on condition of anonymity.
"I would caution people that just because we will be drafting it certainly does not mean an agreement is imminent or that we are certain to eventually get to a resolution."
A spokesman for EU foreign policy chief Catherine Ashton, who coordinates diplomacy with Iran on behalf of the six, said negotiators held a "useful initial discussion" on Wednesday morning and would hold coordination meetings later in the day.
"We are now hoping to move to a new phase of negotiations in which we will start pulling together what the outline of an agreement could be. All sides are highly committed."
Looming in the background of the talks have been threats by Israel, widely believed to have the Middle East's only nuclear weaponry but which sees Iran as a existential threat, to attack Iranian nuclear installations if it deems diplomacy ultimately futile in containing Tehran's atomic abilities and potential.
U.S. President Barack Obama has not ruled the last-ditch option of military action either.
Broadly, the six powers want to ensure the Iranian programme is curtailed enough so that it would take Iran a long time to assemble nuclear bomb components if it chose to do so. The Islamic Republic says it wants only peaceful nuclear energy.
Central to this issue will be the number of centrifuge machines, which potentially can enrich uranium to bomb-fuel quality, that Iran would be permitted to operate.
Tehran has about 10,000 centrifuges running but the West will likely want that number trimmed to the low thousands, a demand that could be unacceptable to the Islamic Republic.
Iran's research and development of new nuclear technologies and the amount of stockpiled enriched uranium it may keep will also be crucial and likely difficult to negotiate. Refined uranium can be used as fuel in nuclear power plants or in weapons if purified to a high enough level.
"Halting research and development of uranium enrichment has never been up for negotiation, and we would not have accepted it either," Iranian Deputy Foreign Minister Abbas Araqchi was quoted as saying by the ISNA news agency.
"But a wide variety of issues have been discussed ... and on uranium enrichment too we have tried to reach consensus."
Iran entered talks with the big powers after moderate President Hassan Rouhani was elected last June.
Diplomats have signalled some progress may have been made during three rounds of expert-level talks since February on one of the thorniest issues - the future of Iran's planned Arak heavy-water reactor, which Western states worry could prove a source of plutonium for nuclear bomb fuel once operational.
But the U.S. official cautioned that some media reports about progress reached up until now were going too far.
"I've read a lot of the optimism you've written," the official told reporters. "It's gotten way out of control."
Other diplomats from the powers warned that progress, if any, in the coming talks will be slow. And any agreement may come only at the 11th hour. "It's very difficult to say how it will all work in practice now. We have no agenda but that's not different from any other meeting," said one.
"The figures will come at the end. They will be part of the big bargaining," he said, referring to decisions about issues such as the number of centrifuges to remain in Iran.
Much of the complexity of the final agreement stems from the fact that its various elements are intertwined. A higher number of centrifuges left in Iran would mean the powers wanting Tehran to more substantially slow down the pace of enrichment to low levels, for example.
"All the parameters are interdependent," one diplomat said.
Politically, any deal could still be torpedoed by conservative hawks in the United States or Iran, and another interfering factor could be the approaching U.S. midterm congressional elections.
Divisions in Washington are closely linked to concerns in Israel that any deal might not go far enough. "We are not against diplomatic solutions. But on the one condition, that it is a serious and comprehensive solution. A solution that can be trusted," Yuval Steinitz, Israel's minister in charge of nuclear affairs, told reporters in Brussels last week in Brussels. (Additional reporting by Fredrik Dahl and Parisa Hafezi in Vienna; Editing by Mark Heinrich)