(Adds opposition saying expects Ban statement in few hours)
* Washington demands U.N.'s Ban withdraws offer to Tehran
* Syria's opposition threatens to pull out of talks
* Ban says Iran accepts earlier accord; Tehran says no
* Diplomats say entire conference in jeopardy
By Louis Charbonneau and Parisa Hafezi
UNITED NATIONS/ANKARA, Jan 20 (Reuters) - An unexpected last-minute U.N. invitation for Iran to a peace conference on Syria threw the talks into doubt on Monday, with Washington demanding Secretary-General Ban Ki-moon withdraw his offer and the Syrian opposition threatening to pull out.
Iran is the main foreign backer of Syrian President Bashar al-Assad and its presence has been one of the most contentious issues looming over the first talks to be attended by both Assad's government and opponents.
The talks are set to start on Wednesday in Switzerland. Expectations of a breakthrough towards ending the almost three-year-old conflict were already low but diplomats said the entire conference was now in jeopardy.
"Is Geneva going to happen? That is the question we can't answer at the moment," a Western diplomat said.
After the clamourous response to his invitation, Ban was "urgently considering his options" his spokesman said.
Adding to dark clouds, Assad said he might seek re-election this year, effectively dismissing any talk of negotiating an end to his rule, his enemies' main demand.
The West and the Syrian opposition have long said Iran must be barred from the conference unless it first accepts an accord reached in Geneva in 2012 calling for a transitional government for Syria, which they see as a step towards unseating Assad.
Ban said he had issued the invitation after Iran's foreign minister assured him Tehran accepted the earlier accord. But Iran said it had done no such thing.
That put Western countries on a collision course with the United Nations: "If Iran does not fully and publicly accept the Geneva communique, the invitation must be rescinded," U.S. State Department spokeswoman Jen Psaki said in a statement.
Syria's main political opposition in exile - the National Coalition, which agreed to attend the conference known as Geneva 2 only two days ago - said it would announce it was withdrawing from the talks unless Ban revoked his invitation by 1900 GMT.
When that deadline passed, they said they expected Ban to make an announcement in a few hours' time and would base their decision on that. There was no immediate comment from the United Nations.
DISPUTE OVER 2012 ACCORD
Ban said his invitation was based on an assurance from Foreign Minister Mohammad Javad Zarif that "Iran understands that the basis for the talks is the full implementation of the 30 June 2012 Geneva communique".
But deputy foreign minister Hosein Amirabdollahian and Supreme Leader Ayatollah Ali Khamenei's top advisor both appeared to contradict him.
"If Ban Ki-moon's invitation is based on Iran accepting the Geneva 1 agreement, then it means setting preconditions and Iran will not accept any preconditions," the official IRNA news agency quoted advisor Ali Akbar Velayati as saying on Monday.
Ban's spokesman, Martin Nesirky, said the secretary general was "deeply disappointed" by Iran's public statements and also disappointed the Syrian opposition had conditioned its participation on the withdrawal of Iran's invitation.
Russia, which has long lobbied for Iran to attend and criticised the opposition and the West for opposing Tehran's presence, said there was no point in a conference without it.
"Not to ensure that all those who may directly influence the situation are present would, I think, be an unforgivable mistake," Foreign Minister Sergei Lavrov said.
Saudi Arabia, Iran's regional foe and the rebels' main sponsor, said Iran should not be permitted to attend because it had troops on the ground aiding Assad. However, it stopped short of saying it would not go or urging the opposition to stay away.
ASSAD TO SEEK RE-ELECTION
The conference had already appeared highly unlikely to produce any major steps towards ending a war that has killed at least 130,000 people, driven a quarter of Syrians from their homes and made half dependent on aid, many out of reach.
Western countries and the opposition say the 2012 accord promoting a transitional governing body means Assad must leave power, and no deal is possible unless he goes. But that fundamental demand, always difficult to achieve, is far less realistic now after a year that saw Assad's position improve both on the battlefield and in the diplomatic arena.
His forces recovered ground, rebels turned against one another and Washington abandoned plans for air strikes, ending two years of speculation that the West might join the war against him as it did against Libya's Muammar Gaddafi in 2011.
In an interview on Monday with news agency AFP, Assad declared that he was likely to run for re-election later this year, making clear that his removal was not up for discussion.
"I see no reason why I shouldn't stand," Assad said. "If there is public desire and a public opinion in favour of my candidacy, I will not hesitate for a second to run for election."
He ruled out accepting opposition figures as ministers in his government, saying that was "not realistic" and said the Swiss talks should aim to "fight terrorism" - his blanket term for his armed opponents.
A powerful alliance of Islamist rebel groups has denounced the Switzerland talks and refused to attend. Even securing the attendance of the main political opposition National Coalition was a fraught affair, with many groups voting not to go.
Syria is now divided, with mainly Sunni Muslim rebels controlling the north and east, Kurds controlling the northeast and Assad's forces, led by members of his Alawite minority sect, controlling Damascus and the coast.
Western leaders who have been calling for Assad to leave power for three years have curbed their support for his opponents over the past year because of the rise of Islamists linked to al Qaeda in the rebel ranks.
The al Qaeda-linked Islamic State in Iraq in and the Levant, which fought battles with other groups and controls the town of Raqqa, imposed sweeping restrictions on personal freedoms in recent days, banning music and images of people.
No faction has the muscle to win a decisive victory on the ground. Rich Sunni Arab states led by Saudi Arabia are funding and arming the rebels, while Iran and its Lebanese Shi'ite allies Hezbollah back Assad. Violence is spreading into neighbouring Iraq and Lebanon, and survival is becoming increasingly difficult for the millions of Syrians forced from their homes.
Syria is one of the biggest issues dividing Tehran from the West at a time when relations marked by decades of hostility have otherwise started to thaw with the election of comparatively moderate president Hassan Rouhani in Tehran.
Global powers agreed in November to ease U.S. and EU sanctions on Iran in return for curbs to its nuclear programme, and some sanctions were suspended on Monday, but the thaw has so far had little impact on Syria diplomacy. (Additional reporting by Michelle Nichols at the United Nations, Oliver Holmes in Beirut, Ali Abdelatti in Cairo, Lesley Wroughton in Washington, John Irish in Paris and Tim Heritage and Gabriella Baczynska in Moscow; writing by Peter Graff; editing by David Stamp and Philippa Fletcher)
Our Standards: The Thomson Reuters Trust Principles.