* Six powers, Iran start three-day talks in Vienna on nuclear deal
* Meeting marks crucial phase of nuclear diplomacy
* Substantial gaps remain but sides hope for deal by July 20
* U.S. official cautions against excessive optimism
By Louis Charbonneau and Justyna Pawlak
VIENNA, May 14 (Reuters) - Six world powers and Iran launch the decisive phase of diplomacy over Tehran's nuclear work during three-day talks starting in Vienna on Wednesday, with the aim of resolving their decade-old dispute by July 20 despite scepticism a deal is possible.
After three months of broad discussions about expectations rather than possible compromises, the sides now plan to start drafting the text of a final accord that could put an end to years of hostility and mistrust and curtail the risk of a new war in the Middle East.
In the next two months, the six powers - the United States, Russia, China, France, Britain and Germany - want Iran to agree to dramatically cut back its nuclear work, which they fear has the aim of producing weapons, while Iran wants them to eliminate devastating economic sanctions.
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 the middle of July.
After that, an interim deal they struck last November expires and its extension would likely complicate talks.
A senior U.S. official has warned about excessive optimism.
"Quite frankly, this is very, very difficult," the official told reporters on Tuesday, 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."
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 denies having such intentions.
Central to this will be the number of centrifuges, which potentially can enrich uranium to bomb-fuel quality, that will be acceptable to remain in Iran.
Tehran has about 10,000 of the machines operating but the West will likely want that number cut to the low thousands, a demand that could be unacceptable to Iranian negotiators.
Iran's research and development of new nuclear technologies and the amount of stockpiled enriched uranium it can keep will also be crucial.
Enriched uranium can be used as fuel in nuclear power plants or in weapons if purified to a high enough level.
Diplomats have signalled some progress may have been made during three rounds of 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 bombs 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 said. "It's gotten way out of control."
Other diplomats from the six 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 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 closely linked. A higher number of centrifuges left in Iran would mean the six powers wanting Tehran to more substantially slow down enrichment of uranium to low levels, for example.
"All the parameters are interdependent," one diplomat said.
Politically, any deal could still be torpedoed by hardliners in the United States or Iran, and talks could be complicated by the upcoming U.S. midterm congressional elections.
Iran joined talks on its nuclear dispute with big powers - coordinated by European Union foreign policy chief Catherine Ashton - after President Hassan Rouhani was elected last June. (Additional reporting by Fredrik Dahl and Parisa Hafezi in Vienna; Editing by Eric Walsh)