* Trump may end support for rebel aid programme
* Gulf Arabs fear growth of Iranian influence
* Saudi king says Arabs feel pain at Aleppo plight
* Assad accuses Gulf Arabs of backing "terrorists"
By Sami Aboudi
DUBAI, Dec 9 (Reuters) - Gulf Arab states that have funded and armed the rebels fighting against Syrian President Bashar al-Assad are not yet ready to give up on aiding the insurgency, even as the rebels seem headed for defeat.
The past two weeks have seen rebels driven from most of the territory they held in Aleppo, once Syria's largest city, the eastern half of which had been in their hands since 2012. Defeat there would cost them their last major urban bastion.
The insurgents have also lost important territory in the suburbs of Damascus and elsewhere in recent months, with Assad now appearing closer to victory than at any point since protests against him evolved into an armed uprising five years ago.
That has plunged the Sunni Muslim Arab rulers into doubt and introspection, after years of calling for Assad's overthrow and backing the rebels against him in a war that has killed hundreds of thousands of people.
For much of the conflict, countries like Saudi Arabia and Qatar have been providing arms and funds to insurgents vetted as "moderate" by Western intelligence agencies, through a coordination centre in Turkey.
They have also offered diplomatic support to opposition groups that consider themselves an alternative government in waiting, and encouraged them to refuse any final settlement that fails to remove Assad from power.
But while the rebels no longer appear to have any path to victory, analysts in the region say the wealthy Gulf monarchies are not ready to give up on them. They could continue to fund and arm a guerrilla insurgency based in rural areas, even if the rebels no longer administer major cities and towns.
"I believe the Gulf states will continue to support the opposition. They will not stop now," said writer and researcher Khaled al-Dakheel.
The Gulf states consider Assad's sponsor Iran to be their arch enemy, are also fighting a war in Yemen against a Shi'ite movement they say is backed by Tehran, and have an interest in perpetuating the Syrian war even if victory is beyond reach.
According to Dakheel, the Gulf rulers are hoping for a boost from Washington with the looming change in U.S. presidential administration. They believe outgoing President Barack Obama was too reluctant to commit military force to confronting Assad and too soft on Iran more generally, and hope for a tougher line from Donald Trump.
So far, Trump has given mixed signals about his plans for the Middle East, promising on the one hand to take a harder line against Iran, but on the other hand suggesting he favours Russia's support for Iran's ally Assad.
Gulf states "will look at the position of the new administration. That position is still vague and presented a confused picture. How can you take a hardline stance and do not mind Assad staying (in power)?" Dakheel said.
Saud Humaid Assubayii, security affairs committee chairman at Saudi Arabia's Shura Council, an appointed advisory body, told Reuters he too expected Gulf Arab officials would wait to see what stance Trump will take on Syria.
Gulf states believe that a stronger line from Obama would have produced a different outcome, he said. Obama threatened to take military action against Assad's government to punish it for using chemical weapons in 2013, but then cancelled the strikes at the last minute after a Russian-brokered deal under which Assad agreed to give up his poison gas arsenal.
"The U.S. has its own weight.... America is an important factor," Assubayii said, speaking in a personal capacity. "Of course, if Obama had stood up to his promises, things would have been changed and worked out differently."
A Gulf diplomat based in Qatar, who spoke on condition he not be identified, said the Arab states were setting their policy first and foremost in response to Tehran.
"Iran's behaviour is dictating Gulf actions and plans. If Iran is more cooperative that will ease worries and slow military escalation in the Gulf," he said. "But if Iran continues to intervene then Arab countries will speed up military efforts to block Iran."
The likelihood of defeat means Arab governments will be casting around for blame. Some analysts say division among the Arab states has helped reduce the effectiveness of the rebel fighters.
Saudi Arabia and Qatar at times supported rival rebel groups. Egypt, the most populous Arab country, has even appeared to switch sides in recent months, providing public support for Assad, to the outrage of Riyadh which has provided billions of dollars in aid to Cairo.
"There wasn't a unified international position. Each country had its own interests and they supported different groups," said Ebtesam Al Ketbi, head of the Emirates Policy Centre think tank.
"The lack of a unified vision weakened the Gulf role. This, of course in addition to the procrastination of the Obama administration," she added. (Additional reporting by Nick Tattersall, Tom Finn, Maha El Dahan and Tulay Karadeniz, Editing by William Maclean and Peter Graff)