DUBAI/LONDON - Iran may be Russia's ally in the Syrian conflict but when it comes to oil, Tehran's arch-enemy Saudi Arabia takes precedence - if last week's OPEC meeting in Vienna is anything to go by.Iran had been pushing hard for oil producers to hold output steady as US sanctions are expected to hit its exports, meaning Tehran had little to gain from OPEC production increases that lower oil prices and cut its revenue.But Saudi Arabia and Russia had other ideas. According to three sources close to OPEC and Russia, the world's two biggest oil exporters agreed in May to work hand in glove to engineer a sizeable increase in oil output - albeit for different reasons.The events in Vienna were the latest example of how Russia and Saudi Arabia have effectively sidelined OPEC, driving policy for their own geopolitical ends and, in the case of Saudi Arabia, often at the behest of the United States.With their end game in mind, Russia first proposed that the combined output of OPEC countries and non-OPEC allies, such as itself, should jump 1.5 million barrels a day (bpd) from July. Their tactic was for Saudi Arabia to then suggest a more modest rise of less than 1 million barrels in the hope it would be acceptable to Iran, the three sources told Reuters.Saudi Arabia was keen to raise output to meet calls from US President Donald Trump and major consumers such as India and China to help cool oil prices and avoid shortages, according to Saudi officials including Energy Minister Khalid al-Falih.Russia, meanwhile, was under pressure from its own energy companies to lift caps on output and fight a steep rise in domestic fuel prices that was hurting President Vladimir Putin's popularity, according to two Russian oil industry sources.In the end, Saudi Arabia pushed through a rise of 1 million bpd at the Vienna meeting, in line with the plan it had agreed with Moscow more than a month earlier.While Russia's motivation was mainly for domestic reasons, the outcome also played into Trump's hands to help lower domestic fuel prices ahead of US midterm elections.ARM-TWISTINGOPEC, the organization that triggered the oil shock of 1973 by restricting supplies to countries supporting Israel in the Yom Kippur war, once controlled 40 percent to 50 percent of the world's oil supply and commanded the full attention of markets.Now, OPEC produces a third of the world's crude, while Saudi Arabia, combined with non-OPEC members Russia and the United States, pump more. What's more, their share of the global market is only set to rise, giving the three countries even more influence over the geopolitics of oil.In a bid to revive oil prices after they fell as low as $27 a barrel in 2016, OPEC and its allies struck a deal to cut oil output by 1.8 million bpd from the start of 2017. The pact rebalanced the market and lifted crude to about $75 a barrel.But unexpected outages in Venezuela, Libya and Angola have effectively increased the cuts to some 2.8 million bpd in recent months and US sanctions are expected to cut Iran's output by a third - all threatening to push crude prices ever higher.Saudi Arabia insisted as recently as April it was too soon to open the taps but Riyadh made a U-turn after its ally the United States called on OPEC to boost supplies.With Russia on the same wavelength for its own reasons, Iran had to be persuaded. But it was not without a fight, and some arm-twisting from Riyadh and Moscow, OPEC sources said.REASONABLE CASEA day before the official OPEC meeting on Friday, Iranian Oil Minister Bijan Zanganeh stormed out of a gathering of OPEC and non-OPEC allies saying there would be no agreement.But a last minute conversation on Friday morning with Falih and Saudi minister of state for energy affairs Prince Abdulaziz helped convince Zanganeh, according to three OPEC sources.A veteran of OPEC diplomacy for more than two decades, the prince, a son of King Salman, was instrumental in getting the initial production pact together in 2016.The Saudi ministers thought they had a reasonable case: OPEC needed to act to tame high oil prices hurting consumers and if Zanganeh refused to sign up, Iran risked being isolated by other producers who would increase production anyway, sources said.Zanganeh was also told if the deal was blocked by Iran, it may lead to the withdrawal of Russia from the agreement, the sources said. One of Tehran's closest allies, Moscow is helping Iran fight to keep Syrian President Bashar al-Assad in power.One Russian energy source said Iran was also keen to keep Moscow on side because it hopes Russia will be able to help it sell crude as the US sanctions bite.The existing OPEC deal dating back from 2016 gave Iran a production quota of 4 million barrels per day. Keeping that deal intact was crucial to Zanganeh, OPEC sources said. Excluding Iran from the new deal would mean a loss of that output quota."We have 24 countries in the agreement, they can always be 23," one of the OPEC sources said.Kuwait, Oman and the United Arab Emirates also participated in efforts to convince Iran, according to OPEC sources.SAUDI OUTPUT SPIKEEvents since the meeting have further underlined how OPEC members are increasingly being left out of crucial production decisions being taken by Saudi Arabia and Russia.When Trump slapped fresh sanctions on Iran in May Saudi Arabia issued a statement the same day saying it was prepared to meet any supply shortage. Riyadh was briefed by Washington a day before the sanctions and was asked to issue the statement, Reuters reported earlier this month.When Washington said this week it was asking customers in Asia and Europe to reduce Iranian oil purchases to zero from November, sources familiar with Saudi oil thinking briefed the market about an imminent rise in Saudi output to a record.It was not clear whether Washington briefed Riyadh this time or whether it asked it to issue a new statement. But as the news about a jump in Saudi output filtered out, oil prices cooled.The Saudi announcement took most OPEC members - and especially Iran - by surprise.Even though the OPEC decision a week earlier was kept deliberately vague last week for both Iran and Saudi to compromise, Falih had promised to only gradually increase its supply by a few "hundreds of thousands of barrels."On Tuesday, sources said Saudi output would rise to a new record of 11 million bpd as early as July, a whole 1 million bpd above May, immediately triggering a protest from Iran."The State Department says it is short and Saudi Arabia says they will produce 11 million bpd in July. I regret to say they are both ridiculing our organization," Iran's OPEC governor Hossein Kazempour Ardebili told Reuters on Thursday.Saudi sources said the kingdom's oil output had already started rising substantially above its quota in June, before the OPEC meeting. The only other oil producing country to boost production above its quota in June was Russia.